I have a constant that receives a json data through fetch. The code is as follows:
const [user, setUser] = useState([]);
Asynchronous function users() { const result = wait fetch (
My API `,{ })
const data = await result.json(); setUser(data);`
I want to display her data in another component, like only name or only ID.
I want to put the name in this little blue block: this is another component
More about the second component
The first component is the component that gets the data, and the second component is the component that displays the data, because you receive user data through props.