memo<P> function
ReactComponentBuilder<P>
memo<P>(
- ReactComponentBuilder<
P> component, { - PropsAreEqual<
P> ? arePropsEqual,
Marks component for memoization.
The JavaScript and SSR renderers apply React.memo when component
produces a registered component node.
Implementation
ReactComponentBuilder<P> memo<P>(
ReactComponentBuilder<P> component, {
PropsAreEqual<P>? arePropsEqual,
}) =>
(props) => MemoizedNode(
component(props),
arePropsEqual: arePropsEqual == null
? null
: (previous, next) => arePropsEqual(previous as P, next as P),
);