please highlight breaking changes when migrating from v2 to v3 (( thank you )).
See original GitHub issueso far I was able to identify 1 breaking change in the lib api.
const [useStore, storeApi] = create(...)
storeApi.setState(...)
const useStore = create(...)
useStore.setState(...)
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Migrating from v2 to v3 - Gatsby
This section explains breaking changes that were made for Gatsby v3. Most, if not all, of those changes had a deprecation message in...
Read more >Migrating from 3.x to 4.0 - Socket.IO
Please note that these breaking changes only impact the API on the server side. The Socket.IO protocol itself was not updated, so a...
Read more >Migrating to SQLAlchemy 2.0
2.0 Migration - ORM Extension and Recipe Changes. Dogpile cache recipe and Horizontal Sharding uses new Session API; Baked Query Extension Superseded by ......
Read more >Changelog - Cypress Documentation
Breaking Changes : Please run cypress open to go through our interactive migration which will guide you in updating your files and configuration...
Read more >How To Migrate From v2 to v3 Mail Send | Twilio
With a few quick changes you will be able to take advantage of the improvements and added features provided by the v3 mail...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Actually, I’d like to highlight a breaking change. When using
devtools
, theset
function which saves the partial object to the state would previously accept thename
of the action as the 2nd param. Now, the 2nd param is changed to whether the partial object should overwrite the state or not - and any previousname
param being passed to theset(...)
would result in the state being overwritten in3.x
whereas this was not the behaviour in2.x
.This is highlighted here: https://github.com/pmndrs/zustand/blob/master/src/middleware.ts#L33
Compared to what was there for 2.x: https://github.com/pmndrs/zustand/blob/f87534e444f2f48a1af89459d141660ffda855c6/src/middleware.ts
Unless I missed something already mentioned before, please highlight this as a breaking change from 2 -> 3 so it’s clear for all. This tripped our upgrade to
3.x
.That was a huge misunderstanding of mine. Thanks for noting. I added a note in v3.0.2 release which has the change. Please suggest better description if you have any. https://github.com/pmndrs/zustand/releases/tag/v3.0.2