April 2020
Intermediate to advanced
716 pages
18h 55m
English
The Users component in client/user/Users.js shows the names of all the users that have been fetched from the database and links each name to the user profile. The following component can be viewed by any visitor to the application and will render at the '/users' route:

In the component definition, similar to how we implemented the Home component, we define and export a function component. In this component, we start by initializing the state with an empty array of users.
mern-skeleton/client/user/Users.js:
export default function Users() { ... const [users, setUsers] = useState([]) ...}
We are using the built-in React ...
Read now
Unlock full access