Skip to content

[Question] Why avoided using Dynamic Routes while creating Server-side-Rendering-Landing-Page-with-Query-Params? #84

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
omareg94 opened this issue Apr 15, 2021 · 2 comments

Comments

@omareg94
Copy link

omareg94 commented Apr 15, 2021

Is there a reason why you avoided using Dynamic Routes in lesson 5.7. Server-side-Rendering-Landing-Page-with-Query-Params and created custom server.js while Dynamic Routes seems simpler?

@pkellner
Copy link
Owner

I agree that dynamic routes are simpler. I probably picked query params instead because they give you a lot more flexibility but certainly, for my example you could use dynamic routing. In real world apps, I've found that it's easy to get boxed into a corner with dynamic routing. Things like checking null conditions and conditionals around dynamic routing can be problematic.

@omareg94
Copy link
Author

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants