mirror of
https://github.com/pmndrs/zustand.git
synced 2025-12-08 19:45:52 +00:00
docs: remove codesandbox refs (#3264)
* Remove codesandbox refs Updated section title and modified demo links. * Remove codesandbox refs * Remove codesandbox refs * Remove codesandbox refs * Reorganize demo links in testing documentation Moved demo links to a new section for better organization. * Update demo links format in immer-middleware.md * feat: update format
This commit is contained in:
parent
a5ffe1b99b
commit
60364224be
@ -39,7 +39,7 @@ export const create = (<T>() => {
|
||||
}) as typeof actualCreate
|
||||
```
|
||||
|
||||
## CodeSandbox Demo
|
||||
## Demo
|
||||
|
||||
- Basic: https://stackblitz.com/edit/zustand-how-to-reset-state-basic
|
||||
- Advanced: https://stackblitz.com/edit/zustand-how-to-reset-state-advanced
|
||||
|
||||
@ -110,6 +110,6 @@ Provide type hints when initializing empty Maps and Sets:
|
||||
|
||||
Without type hints, TypeScript infers `never[]` which prevents adding items later.
|
||||
|
||||
## CodeSandbox Demo
|
||||
## Demos
|
||||
|
||||
Basic: https://stackblitz.com/edit/vitejs-vite-5cu5ddvx
|
||||
|
||||
@ -507,11 +507,6 @@ const renderCounterWithContext = () => {
|
||||
> **Note**: without [globals configuration](https://vitest.dev/config/#globals) enabled, we need
|
||||
> to add `import { describe, test, expect } from 'vitest'` at the top of each test file.
|
||||
|
||||
**CodeSandbox Demos**
|
||||
|
||||
- Jest Demo: https://stackblitz.com/edit/jest-zustand
|
||||
- Vitest Demo: https://stackblitz.com/edit/vitest-zustand
|
||||
|
||||
### Testing Stores
|
||||
|
||||
In the next examples we are going to use `useCounterStore`
|
||||
@ -747,3 +742,8 @@ const renderCounterWithContext = (store) => {
|
||||
functions are built on top of `react-test-renderer`.
|
||||
- **Testing Implementation Details**: Blog post by Kent C. Dodds on why he recommends to avoid
|
||||
[testing implementation details](https://kentcdodds.com/blog/testing-implementation-details).
|
||||
|
||||
## Demos
|
||||
|
||||
- Jest: https://stackblitz.com/edit/jest-zustand
|
||||
- Vitest: https://stackblitz.com/edit/vitest-zustand
|
||||
|
||||
@ -123,7 +123,7 @@ so since both the current state and the next state are
|
||||
equal (if you don't do it correctly),
|
||||
Zustand will skip calling the subscriptions.
|
||||
|
||||
## CodeSandbox Demo
|
||||
## Demos
|
||||
|
||||
- [Basic](https://codesandbox.io/p/sandbox/zustand-updating-draft-states-basic-demo-forked-96mkdw),
|
||||
- [Advanced](https://codesandbox.io/p/sandbox/zustand-updating-draft-states-advanced-demo-forked-phkzzg).
|
||||
- Basic: https://codesandbox.io/p/sandbox/zustand-updating-draft-states-basic-demo-forked-96mkdw
|
||||
- Advanced: https://codesandbox.io/p/sandbox/zustand-updating-draft-states-advanced-demo-forked-phkzzg
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user