Convert React Routes with a Dynamic Param to Programmatic Static Pages

Share this video with your friends

Send Tweet

Often in your plain React app you want to render the same component while passing a dynamic parameter in your URL to change the data. Examples of URL params can be IDs for products, users, books, etc...

When building such an app with plain React you will still need javascript to render these pages even though they don't change that much.

With Gatsby you can pull all the necessary data and build all these pages at build time to guarantee a faster page load time.

In this lesson, you will learn how to extract routes with dynamic parameters and convert them into Gatsby static pages programmatically