MERN React
MERN React
○ Endpoint https://reqres.in/api/users/<id>
○ Show email
Notes
● Create a component, src/session1-takehome/UserDashboard to store the UI and
logic for this Takehome. Export the component and import it in src/App.js.
○ Eg: https://reqres.in/api/users/1
● You must use axios to make API calls and handle errors (and not Fetch API)
References
1. Exports and imports
2. How to pass values inside attributes?
3. Axios
a. Axios GET request syntax (See “GET requests” section)
b. Handling errors
c. Axios vs Fetch (Need only check points 1-5)
4. Event handling in React
5. Styling in React
Tip
● async-await syntax for JavaScript with arrow functions (or function expressions)
● Understand the API response structure and status codes before starting to code
○ You can use an extension like JSONView for Chrome/Brave to format the
API response on browser