All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Expose test utility correctly
- Dropped support for Node < 18
- Using
act
from@testing-library/react
in test util to avoid warnings being printed
- SSR was not working properly, because of missing mandatory
getServerSnapshot
implementation.
- Dropped Node12 support. At least Node14 required now.
- Not compatible anymore to earlier versions of React than 18, because
it makes use of the new hook
useSyncExternalStore
and relies on automatic batching.
- Generating type interface instead of shipping real types to prevent TS errors for consumers.
- Include React 17 as valid peer dependency.
- Optional state does not need to be initialized with explicit
undefined
value anymore. The store updates allow now also to set data that does not belong into the store. Using strict TS checks, should avoid this to happen, so it's not enforced by the given code anymore.
- NextJS stopped working because setting
"type": "module"
in ownpackage.json
was overriding the default of the package importer. Hence, the package could only be used as ESM.
Store.listen
allows adding (and removing) listeners on the store outside react components.
- Allowing
undefined
types on top-level thanks to hint of @InExtremaRes.
- Test-Util
react-use-sub/test-util
. More details.
- Node version >= 12 requirement. Possibly still works with older Node versions.
- Conditional store updates.
- Improve IDE auto-import by moving index file into root directory.
- Fix rarely omitted re-rendering
- Fix error on update with external deps
- Export some utility types
- Lower peer deps requirements
- Publish first stable version