Skip to content

Releases: aduth/hijinks

2.0.3

22 Jun 20:12
Compare
Choose a tag to compare

Bug Fixes

  • Fix an issue where a boolean child (true or false) 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, -5b Fragment)
    • Assign props value in initialization (-1b)
    • Simpler boolean comparison (-3b)
    • Use simple loop in append (-4b)

v2.0.2

19 Jul 22:00
Compare
Choose a tag to compare

TypeScript

  • Fix TypeScript typings for createElement tag and children argument types.

v2.0.1

19 Jul 21:39
Compare
Choose a tag to compare

Optimization

  • Condense and simplify logic for children normalization (-15b).

v2.0.0

19 Jul 01:39
Compare
Choose a tag to compare

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 as h.

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!

05 Jun 02:36
Compare
Choose a tag to compare

🚀 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

25 Feb 02:45
Compare
Choose a tag to compare
  • Further optimize children normalization logic, saving 13kb minified / 2kb gzipped (79fd93f)

v1.0.1: npm Repository

25 Feb 02:30
Compare
Choose a tag to compare
  • Add repository details to npm package