-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating

Learn React with TypeScript
By :

In this section, we will create the first iteration of the app, which will use a technique called prop drilling to share state between components. After we create the project, we will take the time to understand what prop drilling is and then make use of it in the app.
The app we will build will contain a header and some content beneath it. Here is the component structure we will create:
Figure 10.1 – App component structure
The header will have a Sign in button to authenticate and authorize a user to get their name and permissions. Once authenticated, the user’s name will be displayed in the app header, and the user will be welcomed in the content. If the user has admin permissions, important content will be shown.
Carry out the following steps to create the initial versions of the files that we need in the app without any state sharing. We will copy and paste the code from the GitHub repository...