Skip to content

SwitchCaseMemoized

Memoized version of SwitchCase component. Both [Switch] and [Case] are wrapped with React.memo, preventing re-renders when their props have not changed. Prefer this over SwitchCase in performance-sensitive trees where the parent re-renders frequently.

Demo

INFO

Memoized implementation of SwitchCase component.

Please visit SwitchCase component example to see how it works.

Released under the MIT License.