Skip to main content

v1.0.0

cotton-box

  • This package now has the following external dependencies:
  • Fixed README.md now displays the correct description: "This is the core package of cotton-box." instead of "This is the official React bindings for cotton-box."
  • Watcher has been moved back to @glyph-cat/swiss-army-knife
    • An internal implementation of "Watcher" still remains, but it is optimized for Cotton Box only (behavior and API can change suddenly), so it no longer makes sense to expose the Watcher API from this package.
  • .watch and .wait no longer includes event type.
  • State manager names remain optional, but if not provided, automatic names will no longer be generated either.
  • Internal performance optimizations.

cotton-box-react

  • This package now has the following external dependencies:
  • This package now requires React 19 (or above) to work
  • There is now a bundle specifically for React Native that excludes SSR logic which is only used for web (dead code in the case of React Native).
    • No changes are required to take advantage of this optimization
    • Web compilers (eg: babel, webpack) and React Native bundler (Metro) will be able to automatically select the correct bundle when compiling.
  • Added new hook useSimpleStateValueOnly. It is similar to useSimpleStateValue but does not support any additional options or selectors.
  • useSimpleStateValueOnly and useSimpleStateValue returns the never type when used with StateManager or AsyncStateManager. They are designed to be used with SimpleStateManager or SimpleFiniteStateManager only.
  • Removed previously deprecated APIs:
    • useSimpleStateValueWithReactiveSelector
    • useStateValueWithReactiveSelector
  • Internal performance optimizations.