Master the Power of Next.js 13: Dynamic Routes Made Easy

Опубликовано: 15 Июль 2023
на канале: Konstantyn's coding
382
5

It's very easy to create dynamic routes in Next.js 13. All you have to do is to wrap your folder name into square brackets.
#nextjs13 #nextjstutorial #nextjs13

I will show you the real world example of creating the dynamic routes based on a data fetched from the server, so let's dive in!

------------------------------------------------
Hello, my name is Konstantyn, I'm a Senior Frontend Engineer working in the lovely city of Warsaw. My main technology stack is React. Please ask me questions in comments and subscribe for more tutorials like this!

LinkedIn:   / kostianty.  .
GitHub: https://github.com/burlai

☕ Buy Me A Coffee: https://www.buymeacoffee.com/konstantyn
-------------------------------------------------

Dynamic routes is pretty common scenario in any fairly complex application. For example this could be blog posts, articles on a news website or pages of products in online shop.
Let's create a simple example of dynamic routes.

In this case a word "slug" means the last part of the URL that identifies a specific page. It is typically human-readable and represents the page's title or topic.

For example, in the URL "https://www.example.com/blog/my-artic...", the slug is "my-article-about-slug."

next js next js tutorial next js 13 tutorial