getServerSideProps: with catch-all routing

This page uses getServerSideProps() to fetch a TV show from an API.
It uses catch-all routing.

URL parameters are made available in getServerSideProps:
[0]: 590
[1]: catch
[2]: all
[3]: routing

The first URL parameter determines the ID of the TV show to fetch.

You can change the URL to anything else, such as /getServerSideProps/112/whatever/path/you/want. Try it!

View code on GitHub

Show #590: Pokémon

https://api.tvmaze.com/shows/590

Type: Animation
Language: Japanese
Status: Running
Premiered: 1997-04-01
Official Site: https://www.tv-tokyo.co.jp/anime/pocketmonster/
Rating (average): 7.8


Go back home