Skip to content
Myr

docs: remove codesandbox refs (#3264)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

* 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

authored by Danilo Britto · committed by GitHub · parent a5ffe1b · Browse files · 4 files+10 added−10 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

4 files+10 added−10 removed

  • other:+10 added−10 removed

4 files+10 added−10 removed

modified:docs/guides/how-to-reset-state.md+1 added-1 removed
modified:docs/guides/maps-and-sets-usage.md+1 added-1 removed
modified:docs/guides/testing.md+5 added-5 removed
505 unmodified lines
506507> **Note**: without [globals configuration](https://vitest.dev/config/#globals) enabled, we need508> to add `import { describe, test, expect } from 'vitest'` at the top of each test file.509510**CodeSandbox Demos**511512- Jest Demo: https://stackblitz.com/edit/jest-zustand513- Vitest Demo: https://stackblitz.com/edit/vitest-zustand514510### Testing Stores511512In the next examples we are going to use `useCounterStore`513
227 unmodified lines
741 is a very lightweight solution for testing React Native components, similarly to RTL, but its742 functions are built on top of `react-test-renderer`.743- **Testing Implementation Details**: Blog post by Kent C. Dodds on why he recommends to avoid744 [testing implementation details](https://kentcdodds.com/blog/testing-implementation-details).745746## Demos747748- Jest: https://stackblitz.com/edit/jest-zustand749- Vitest: https://stackblitz.com/edit/vitest-zustand
modified:docs/integrations/immer-middleware.md+3 added-3 removed
121 unmodified lines
122so since both the current state and the next state are123equal (if you don't do it correctly),124Zustand will skip calling the subscriptions.125126## CodeSandbox Demo126## Demos127128- [Basic](https://codesandbox.io/p/sandbox/zustand-updating-draft-states-basic-demo-forked-96mkdw),129- [Advanced](https://codesandbox.io/p/sandbox/zustand-updating-draft-states-advanced-demo-forked-phkzzg).128- Basic: https://codesandbox.io/p/sandbox/zustand-updating-draft-states-basic-demo-forked-96mkdw129- Advanced: https://codesandbox.io/p/sandbox/zustand-updating-draft-states-advanced-demo-forked-phkzzg