Skip to content

Commit

Permalink
Prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
loganvolkers authored Nov 3, 2023
1 parent 72d7040 commit 4ae12c6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
9 changes: 5 additions & 4 deletions docs/guides/component-state.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,11 @@ https://codesandbox.io/s/valtio-component-ye5tbg?file=/src/App.tsx
## Alternatives

If you are not happy with useRef usage, consider:
* [use-constant](https://www.npmjs.com/package/use-constant)
* [bunshi](https://www.bunshi.org/recipes/valtio/)
* You may also create custom hooks wrapping useContext and optionally useSnapshot.

- [use-constant](https://www.npmjs.com/package/use-constant)
- [bunshi](https://www.bunshi.org/recipes/valtio/)
- You may also create custom hooks wrapping useContext and optionally useSnapshot.

### Bunshi example

https://codesandbox.io/s/77r53c?file=/molecules.ts
https://codesandbox.io/s/77r53c?file=/molecules.ts
9 changes: 5 additions & 4 deletions docs/how-tos/how-to-use-with-context.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,11 @@ const MyCounter = () => {
## Alternatives

If you are not happy with `useRef` usage, consider:
* [use-constant](https://www.npmjs.com/package/use-constant)
* [bunshi](https://www.bunshi.org/recipes/valtio/)
* You can create custom hooks to `useContext` and optionally `useSnapshot`

- [use-constant](https://www.npmjs.com/package/use-constant)
- [bunshi](https://www.bunshi.org/recipes/valtio/)
- You can create custom hooks to `useContext` and optionally `useSnapshot`

### Bunshi example

https://codesandbox.io/s/77r53c?file=/molecules.ts
https://codesandbox.io/s/77r53c?file=/molecules.ts

0 comments on commit 4ae12c6

Please sign in to comment.