-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Update Zustand, resolve deprecated imports #3423
Conversation
765c981
to
c738c8f
Compare
c738c8f
to
1abfe8d
Compare
Removed vultr server and associated DNS entries |
interface PlanXStores { | ||
// Non-React implementation (e.g. for use in tests) | ||
vanillaStore: StoreApi<FullStore>; | ||
// React hook | ||
useStore: UseBoundStore<StoreApi<FullStore>>; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Zustand no longer requires the use of a vanilla store outside of React components.
This means we can use the useStore()
hook in React components, and useStore.getState()
elsewhere consistently.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really nice simplification!
What does this PR do?
zustand/vanilla
(see below)Motivation
planx-new/editor.planx.uk/src/pages/Preview/Questions.tsx
Lines 100 to 112 in b484df1