Querying for Users

Learn to enable querying for union types in a React application.

A new page

In order to query for users, let’s create a brand new page within our application. We will create a new file at pages/users/[username].tsx for this. This page will be matched by an address such as http://*address_to_app*/users/radar12. Here is the code that we will put on this page:

Get hands-on with 1200+ tech skills courses.