Skip to content

Commit

Permalink
Prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
loganvolkers authored and dai-shi committed Nov 4, 2023
1 parent fe4587b commit a39759a
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

1 comment on commit a39759a

@vercel
Copy link

@vercel vercel bot commented on a39759a Nov 4, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

valtio – ./

valtio-git-main-pmndrs.vercel.app
valtio.pmnd.rs
valtio.vercel.app
valtio-pmndrs.vercel.app

Please sign in to comment.