Releases: aduth/hijinks
Releases · aduth/hijinks
2.0.3
Bug Fixes
- Fix an issue where a boolean child (
true
orfalse
) is rendered as text.
Optimization
- Condense and simplify logic (original savings -20b, overall -10b with bug fix):
- Component test (-10b)
- Children test (-2b)
- Fragment appending (-0b
createElement
, -5bFragment
) - Assign props value in initialization (-1b)
- Simpler boolean comparison (-3b)
- Use simple loop in append (-4b)
v2.0.2
v2.0.1
v2.0.0
Breaking Changes
- The attributes positional argument must always be provided, even if null or undefined.
- Drop support for Node v10.
- There is no longer a default export. The
createElement
function is now a named argument, aliased ash
.
New Features
- Support for fragments via the
Fragment
export. - Add JSX runtime for use with Babel automatic JSX transform.
Enhancements
- For alignment with similar libraries, children can be passed either as an attribute or as a third argument, or as variadic argument after attributes.
- Include TypeScript type definitions.
Optimization
- Shrink bundle size by around 17% in optimal scenarios (with tree-shaking)
- Simplify append behavior
v1.1.0: Components!
🚀 New Features
- Compose reusable components. When passed a function as the first argument, render behavior is deferred to this function; passed attributes including children, the function is expected to return an HTMLElement.
Example:
function Heading( attributes ) {
return h( 'h' + attributes.level, attributes.children );
}
var element = h( 'div',
h( Heading, { level: 2 }, 'Example' ),
'Content'
);
v1.0.2: More smaller
- Further optimize children normalization logic, saving 13kb minified / 2kb gzipped (79fd93f)
v1.0.1: npm Repository
- Add repository details to npm package