Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docs/react-integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,10 @@ const TodoView = observer(({ todo }: { todo: Todo }) => {
})
```

Use `observer` when a component reads observables during its own render. Use `<Observer>` when another component invokes a render callback that contains the observable read. They create tracked render regions at different boundaries. When combining `observer` with another higher-order-component, keep `observer` innermost as described in the [wrap-order tip](#wrap-order).

**Optional background:** The contributor maintains a [render props and higher-order components exercise](https://frontendatlas.com/react/trivia/react-render-props-vs-hocs) on FrontendAtlas.

## Tips

<details id="static-rendering"><summary>Server Side Rendering (SSR)<a href="#static-rendering" class="tip-anchor"></a></summary>
Expand Down