Error: Objects are not valid as a React child (found: object with keys {text}). If you meant to render a collection of children, use an array instead.
See original GitHub issue
export const targetLayerSelector = selector({
key: "target-layer-selector", // unique ID
get: ({ get }) => {
// const id = get(targetLayerIdAtom);
// const layer = currentSceneRepository.layer(id)
return {
text: "hi"
}
// return layer.data
return undefined!
},
});
this causes
Issue Analytics
- State:
- Created 3 years ago
- Comments:11
Top Results From Across the Web
Objects are not valid as a React child. If you meant to render a ...
If you meant to render a collection of children, use an array instead. Just remove the async and everything should work fine. –...
Read more >Understanding the "Objects are not valid as a react child" Error ...
The "Objects are not valid as a React child" error happens when trying to render a collection of data by mistakenly returning the...
Read more >Resolving Error: "Objects are not valid as a React child"
As the error message states, React cannot render objects as children directly. If you are seeing this error, there is a good chance...
Read more >Invariant Violation: Objects are not valid as a React child
Objects are not valid as a React child (found: object with keys ...). If you meant to render a collection of children, use...
Read more >Fixing 'Objects are not valid as a React child' - developer.school
Objects are not valid as a React child. If you meant to render a collection of children, use an array instead. Video. Want...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks for the help!
from
<Typography variant="h6">no key is set for selected layer "{targetLayer}"</Typography>
to<Typography variant="h6">no key is set for selected layer "{JSON.stringify(targetLayer)}"</Typography>