Skip to content

Releases: hmans/statery

v0.7.1

30 Aug 17:42
ec690db
Compare
Choose a tag to compare

Patch Changes

  • f18b084: Fixes SSR issue with Next.js requiring the getServerSnapshot argument with useSyncExternalStore.

v0.7.0

01 Aug 06:47
b35db5e
Compare
Choose a tag to compare

Minor Changes

  • 8928b16: Statery's React hooks now internally use React 18's new useSyncExternalStore hook. This simplifies the library implementation and makes sure that store updates don't cause UI drift. (Thanks @smartinio!)
  • 8c555e2: This package is now built using TypeScript 5.1.

v0.6.3

15 Oct 05:32
cc709ea
Compare
Choose a tag to compare

Patch Changes

  • a9923df: Fixed: The library recently started using useLayoutEffect instead of useEffect, breaking it in SSR environments, where usage of that hook throws errors. This has been fixed. (Thanks @daveschumaker!)

v0.6.2

17 Sep 06:03
5e75c7f
Compare
Choose a tag to compare

Patch Changes

  • 5c8de24: Revert the previous fix for potentially infinite rerenders -- turns out it was a user issue (the user being me!), and the fix would actually cause bigger problems elsewhere.

v0.6.1

16 Sep 18:46
ed5c647
Compare
Choose a tag to compare

Patch Changes

  • c69ab20: Updating the same state property multiple times within the same React side effect would sometimes trigger multiple rerenders of the component, resulting in an infinite loop (for example when writing into the store in a ref function.) This has now been fixed.

v0.6.0

13 Sep 13:14
83c0439
Compare
Choose a tag to compare

Minor Changes

  • d2eb9b4: Fixed: useStore now hooks into the store using useLayoutEffect, not useEffect
  • 53fff47: Refreshed all of the package's dependencies and brushed up its test setup.
  • 5b64a96: Switched the library's build tool to Preconstruct. If everything breaks, it's on me! 🎉
  • 53fff47: Statery now requires React 18 and up!
  • 75d0a40: Simplify types.
  • da27eba: set now takes a second options argument. The only available option so far is forceNotify; when set to true, all updated properties will be notified, regardless of referential equality to the previous value.

Patch Changes

  • a5f5533: useStore will now force the component to re-render if a change was detected between the React render/reconcile stage and the invocation of the layout effect that actually sets up the subscription listener. This improves reactivity in situations where values were changed in the store during the render phase, or imperatively from outside of your React component tree.

v0.6.0-next.3

09 Sep 17:31
8b25804
Compare
Choose a tag to compare
v0.6.0-next.3 Pre-release
Pre-release

Minor Changes

  • 5b64a96: Switched the library's build tool to Preconstruct. If everything breaks, it's on me! 🎉

v0.6.0-next.2

20 Aug 19:41
987c656
Compare
Choose a tag to compare
v0.6.0-next.2 Pre-release
Pre-release

Patch Changes

  • a5f5533: useStore will now force the component to re-render if a change was detected between the React render/reconcile stage and the invocation of the layout effect that actually sets up the subscription listener. This improves reactivity in situations where values were changed in the store during the render phase, or imperatively from outside of your React component tree.

v0.6.0-next.1

26 Jul 16:17
4ffc7fc
Compare
Choose a tag to compare
v0.6.0-next.1 Pre-release
Pre-release

Minor Changes

  • 75d0a40: Simplify types.
  • da27eba: set now takes a second argument forceNotify; when set to true, all updated properties will be notified, regardless of referential equality to the previous value.

v0.6.0-next.0

26 Jul 14:11
96a4922
Compare
Choose a tag to compare
v0.6.0-next.0 Pre-release
Pre-release

Minor Changes

  • d2eb9b4: Fixed: useStore now hooks into the store using useLayoutEffect, not useEffect
  • 53fff47: Refreshed all of the package's dependencies and brushed up its test setup.
  • 53fff47: Statery now requires React 18 and up!