Skip to content

Commit

Permalink
Update readme.md
Browse files Browse the repository at this point in the history
  • Loading branch information
drcmda committed Jul 8, 2021
1 parent 16cbd3c commit b8fa9b4
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,15 +100,6 @@ const treats = useStore(
)
```

## Fetching from multiple stores

You can make as many stores as you like, forwarding results to succeeding selectors is as natural as it gets.

```jsx
const currentBear = useCredentialsStore(state => state.currentBear)
const bear = useBearStore(state => state.bears[currentBear])
```

## Memoizing selectors

It is generally recommended to memoize selectors with useCallback. This will prevent unnecessary computations each render. It also allows React to optimize performance in concurrent mode.
Expand Down

0 comments on commit b8fa9b4

Please sign in to comment.