question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

image

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:11

github_iconTop GitHub Comments

1reaction
softmarshmallowcommented, Nov 27, 2020

Thanks for the help!

1reaction
softmarshmallowcommented, Nov 27, 2020

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>

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found