Skip to content

Commit

Permalink
Merge pull request #160 from StitiFatah/patch-1
Browse files Browse the repository at this point in the history
fix anchor links
  • Loading branch information
jmeistrich authored Jul 27, 2023
2 parents 3c66467 + 348224f commit a2276a1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/3-react/2-react-API.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const Component = ({ id }) => {

Like `observe`, `useObserve` has an optional second callback parameter which will run after the selector, and does not track changes. This can be useful for observing an `event` or a single `observable`.

Note that `useObserve` runs during component render, not after render like `useEffect`. If you want an observer that runs after render, see [useObserveEffect](#useObserveEffect).
Note that `useObserve` runs during component render, not after render like `useEffect`. If you want an observer that runs after render, see [useObserveEffect](#useobserveeffect).

```jsx
import { event } from "@legendapp/state"
Expand Down Expand Up @@ -67,7 +67,7 @@ function ProfilePage() {

### useObserveEffect

`useObserveEffect` is the same as [useObserve](#useObserve) except that it doesn't run until the component is mounted.
`useObserveEffect` is the same as [useObserve](#useobserve) except that it doesn't run until the component is mounted.

## observer HOC

Expand Down

0 comments on commit a2276a1

Please sign in to comment.