F
useShallow
Wraps a selector so a result shallow-equal to its last one returns the last one, which skips the re-render.
function useShallow<S, U>(selector: (state: S) => U): (state: S) => UParameters
| Name | Type | Description |
|---|---|---|
| selector | (state: S) => U |
Returns
(state: S) => U