Join 1M+ other developers and:
- Get help and share knowledge in Q&A
- Subscribe to topics of interest
- Get courses & tools that help you grow as a developer or small business owner
Dynamic HTTP Routes for CRA (using react router dom)
I just deployed my react app with digital ocean. I’m wondering how to add dynamic routes to my HTTP routes.
Currently I’m trying the following YAML configuration but it is not working.
routes: - path: / - path: /dashboard - path: /invoice - path: /patient - path: /profile - path: /patient/[id]
How can I add a dynamic route for (example):
https://mydoapp.com/patient/1 https://mydoapp.com/patient/2 https://mydoapp.com/patient/3
Am I missing something?
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.×