How to Validate Dynamic Routes in React Router

Fetch and validate the data before rendering the component