Reactjs Falsely Claims A String Is An Object And Refuses To Render
Setup and environment: App is created with create-react-app, contained in App.js, and run using npm start at the command line. Obligatory source code: import React from 'react'; im
Solution 1:
getRemoteData
is an async
function. It returns a Promise, which is an object.
To deal with asynchronous data, you need to store the result in the state and use that instead.
See also the React FAQ: AJAX and APIs
Post a Comment for "Reactjs Falsely Claims A String Is An Object And Refuses To Render"