Skip to content

Wrap in observer() all view components ​

All view components passed to withViewModel() / withPropsViewModel() are automatically wrapped in observer() from mobx-react-lite.

You do not need to wrap the render function in observer() yourself when using these HOCs.

When using useCreateViewModel directly, wrap your component in observer() as usual.