How to make conditional Routing, if and only if some conditions satisfies then only routing should happen. for example, if and only if the user enters the correct credential
I would like to join the party with simple solution.
Just conditional render in the component prop in as follows:
Loading posts... : () => } />
Here i am trying to fetch some data from an api when it fetched (loading) should be false and renders Home component.