Page 1 of 1

Create a React App that uses the Context API in order to share information between its' components. In your app, you are

Posted: Mon Jun 06, 2022 1:58 pm
by answerhappygod
Create A React App That Uses The Context Api In Order To Share Information Between Its Components In Your App You Are 1
Create A React App That Uses The Context Api In Order To Share Information Between Its Components In Your App You Are 1 (31.47 KiB) Viewed 32 times
Using React - Node.js
Create a React App that uses the Context API in order to share information between its' components. In your app, you are going to have a structure similar to what we saw during the lecture (header, body, footer). At the header level, include a button that shows/hides a login form in the body (this can be achieved through a boolean value in the context). Then once the user clicks to submit the form, use show the username in message similar to "Hello, <username>". Below you can find an example image of how your header could look like.

<body> <footer> on click, show the form <header> username password submit footer is just cosmetic login input input on click, hide the form and take show the username on the header. If username or password are empty, show an alert instead of hiding the form.