Skip to content

Releases: C-D-Lewis/fabricate.js

v2.9.0

06 Aug 17:00
adc4209
Compare
Choose a tag to compare
  • Type of onUpdate watched keys must be keys from the passed StateShape

v2.8.2

02 Aug 20:00
Compare
Choose a tag to compare

Fixes

  • Fix leaking state watchers when a component uses .onUpdate() or .conditional() is used, and subsequently removed from the DOM.

v2.8.1

01 Aug 20:06
Compare
Choose a tag to compare

Changes

  • .when() is replaced by .displayWhen(), since it is created immediately when state might not be present.

Features

  • .conditional() - allows creation of components only when a state test is made, instead of merely hiding it in contrast to .when()

v2.7.0

23 Jul 13:22
df9704d
Compare
Choose a tag to compare
  • Improve typings for update() and setStyles()

v2.6.0

05 Jul 19:57
Compare
Choose a tag to compare

Features

  • Add strict option - only state keys declared in the initialState can be updated, helping keep track of app state.
  • Add buildKey() helper, allowing dynamic state keys to be used with strict mode.

v2.5.0

30 Apr 08:48
Compare
Choose a tag to compare

Features:

  • Add onEvent for components to allow listening to any other kind of Event, such as 'load'.
  • Add onKeyDown helper to allow listening globally for key presses. Useful for keyboard shortcuts.
  • Update types.

v2.4.1

02 Apr 12:30
9c0d0f3
Compare
Choose a tag to compare

Fixes:

  • changeCb for when is optional in types.

v2.4.0

02 Apr 12:20
e97a173
Compare
Choose a tag to compare

Features:

  • None

Other:

  • Add types/fabricate.d.ts to facilitate web apps built with TypeScript.

v2.3.3

29 Nov 20:16
Compare
Choose a tag to compare

Changes

  • Only notify conditionally rendered component when not initial render.

v2.1.0

02 Oct 11:05
3c3ee5b
Compare
Choose a tag to compare
  • Add second callback to .when() to know when the element is shown or hidden.
  • Fix initial state calculation for .when()