Skip to content
public-library›Rules›Zustand›Subscribe with narrow, stable selectors

Subscribe with narrow, stable selectors

Read only what a component uses, with a selector. Select a single value directly, and wrap selectors that return a new object or array in useShallow.

In the full rule