I want to get data from swapi and do jsx component with this data, but react give me a error when i want to use this data This my fetch
var promise = await fetch('https://swapi.dev/api/people/1/')
.then((res) => res.json() )
.then(data => setLuke(data.data))
And this is react error:
Objects are not valid as a React child (found: [object Promise]). If you meant to render a collection of children, use an array instead. i dont know what to do can you help me with this little problem