upgrade: flux-store package upgrade for Solid 2.0#917
Conversation
🦋 Changeset detectedLatest commit: c50bb56 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Upgrades
@solid-primitives/flux-storeto Solid 2.0 beta.14. No design changes were needed — the primitive has no async reactivity, no directives, and no lifecycle hooks. The migration is entirely mechanical.What changed
Imports —
createStoreandStoreSetter(formerlySetStoreFunction) now come fromsolid-jsdirectly;solid-js/storeno longer exists as a separate module.Store setter is now draft-first — The
setStatepassed toactionsno longer accepts path-style arguments. Users must pass a draft mutator instead:produceremoved — Solid 2.0 stores are draft-first by default, soproduceis gone. ReplacesetState(produce(s => ...))withsetState(s => ...).batchremoved fromcreateAction— All writes are auto-batched in Solid 2.0, so the explicitbatch()wrap was dropped. Actions remainuntracked.Other fixes
primitive.listentry from"createFluxFactory"→"createFluxStoreFactory"createAction/createActionsdocumented,createFluxStoreFactoryexample expanded to show independent instances and both override formsSummary by CodeRabbit
Breaking Changes
setStatenow requires draft-first mutations via callbacks instead of path-style argumentsproducehelper in favor of inline draft mutationscreateActionDocumentation