Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
David Maskasky committed Oct 3, 2023
1 parent 34f95a0 commit 8457666
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/mutableAtom/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ function mutableAtom<Value>(value: Value, options?: Options<Value>): Atom<{ valu
Count value is stored under the `value` property.

```jsx
const countProxyAtom = mutableAtom<Value>(0)
const countProxyAtom = mutableAtom(0)

function IncrementButton() {
const countProxy = useAtomValue(countProxyAtom)
Expand All @@ -117,7 +117,7 @@ type Options<Value> = {
Be careful not to mutate the proxy directly in the atom's read function or during render in React components. Doing so might trigger an infinite render loop.

```ts
const countProxyAtom = mutableAtom<Value>(0)
const countProxyAtom = mutableAtom(0)

atom(
(get) => {
Expand Down

0 comments on commit 8457666

Please sign in to comment.