Skip to content
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

Update 10-router-handlers.mdx - Switcher Created + Small Syntax Improvement #51003

Merged
merged 2 commits into from Jun 9, 2023

Conversation

thepatrick00
Copy link
Contributor

Added a TS and JS switcher. Previously the code snippet did not have a switcher. The file extension was .js when the code was TypeScript which made it confusing to try to read.

When I first saw this section, I got confused due to the wrongly named file ending and the multiline TypeScript syntax.

What I did was added a TS and JS switcher. I also changed the TypeScript syntax for { params } : { params: { slug: string }}

This is how I saw it written in the example in 05-dynamic-routes of the documentation and I think it is much easier to read and less confusing.
@leerob leerob merged commit 3817770 into vercel:canary Jun 9, 2023
7 checks passed
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 9, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants