Skip to content

Commit

Permalink
Update readme.md
Browse files Browse the repository at this point in the history
  • Loading branch information
drcmda committed Oct 21, 2019
1 parent d796d86 commit f856f5f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,13 @@ If you want to construct a single object with multiple state-picks inside, simil
```jsx
import shallow from 'zustand/shallow'

// Object pick
// Object pick, re-renders the component when either foo or bar change
const { foo, bar } = useStore(state => ({ foo: state.foo, bar: state.bar }), shallow)

// Array pick
// Array pick, re-renders the component when either foo or bar change
const [foo, bar] = useBuerli(state => [state.foo, state.bar], shallow)

// Mapped picks
// Mapped picks, re-renders the component when state.objects changes in order, count or keys
const keys = useBuerli(state => Object.keys(state.objects), shallow)
```

Expand Down

0 comments on commit f856f5f

Please sign in to comment.