Comparing version 4.3.8 to 4.3.9
{ | ||
"name": "zustand", | ||
"private": false, | ||
"version": "4.3.8", | ||
"version": "4.3.9", | ||
"description": "🐻 Bear necessities for state management in React", | ||
@@ -6,0 +6,0 @@ "main": "./index.js", |
@@ -18,3 +18,3 @@ <p align="center"> | ||
```bash | ||
npm install zustand # or yarn add zustand | ||
npm install zustand # or yarn add zustand or pnpm add zustand | ||
``` | ||
@@ -163,3 +163,3 @@ | ||
Sometimes you need to access state in a non-reactive way, or act upon the store. For these cases the resulting hook has utility functions attached to its prototype. | ||
Sometimes you need to access state in a non-reactive way or act upon the store. For these cases, the resulting hook has utility functions attached to its prototype. | ||
@@ -186,3 +186,3 @@ ```jsx | ||
If you need to subscribe with selector, | ||
If you need to subscribe with a selector, | ||
`subscribeWithSelector` middleware will help. | ||
@@ -262,3 +262,3 @@ | ||
## Sick of reducers and changing nested state? Use Immer! | ||
## Sick of reducers and changing nested states? Use Immer! | ||
@@ -268,3 +268,3 @@ Reducing nested structures is tiresome. Have you tried [immer](https://github.com/mweststrate/immer)? | ||
```jsx | ||
import produce from 'immer' | ||
import { produce } from 'immer' | ||
@@ -378,3 +378,3 @@ const useLushStore = create((set) => ({ | ||
Or, just use our redux-middleware. It wires up your main-reducer, sets initial state, and adds a dispatch function to the state itself and the vanilla API. | ||
Or, just use our redux-middleware. It wires up your main-reducer, sets the initial state, and adds a dispatch function to the state itself and the vanilla API. | ||
@@ -404,4 +404,4 @@ ```jsx | ||
// Usage with a plain action store, it will log actions as "setState" | ||
const usePlainStore1 = create(devtools(store), { name, store: storeName1 }) | ||
const usePlainStore2 = create(devtools(store), { name, store: storeName2 }) | ||
const usePlainStore1 = create(devtools(store, { name, store: storeName1 })) | ||
const usePlainStore2 = create(devtools(store, { name, store: storeName2 })) | ||
// Usage with a redux store, it will log full action types | ||
@@ -521,3 +521,3 @@ const useReduxStore = create(devtools(redux(reducer, initialState)), , { name, store: storeName3 }) | ||
- Recommended usage for this unopinionated library: [Flux inspired practice](./docs/guides/flux-inspired-practice.md). | ||
- [Calling actions outside a React event handler in pre React 18](./docs/guides/event-handler-in-pre-react-18.md). | ||
- [Calling actions outside a React event handler in pre-React 18](./docs/guides/event-handler-in-pre-react-18.md). | ||
- [Testing](./docs/guides/testing.md) | ||
@@ -527,3 +527,3 @@ | ||
Some users may want to extends Zustand's feature set which can be done using third-party libraries made by the community. For information regarding third-party libraries with Zustand, visit [the doc](./docs/integrations/third-party-libraries.md). | ||
Some users may want to extend Zustand's feature set which can be done using third-party libraries made by the community. For information regarding third-party libraries with Zustand, visit [the doc](./docs/integrations/third-party-libraries.md). | ||
@@ -530,0 +530,0 @@ ## Comparison with other libraries |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
283473