TLDR; You can't. But here's what you should do – well explained. Split the component or move the conditional to a custom hook or conditionally fire an effect callback function. Some people believe that
Understand what redux toolkit is, what it offers, how to install it and why it may be worth your time.
The goal of this guide is to provide an easier to read version of the official React hooks documentation. This guide is a living document; with relevant changes made as the official docs
Why you should think in Reusable Patterns
Even though props are the first introduction you get to React component reusability, exposing your component to more and more props don't necessarily translate to more reusability.