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.

Uncaught Error: Unexpected object passed to ReactTestInstance constructor (tag: 13). This is probably a bug in React.

See original GitHub issue

Hello,

I’m testing v16.3.0 and I’m getting this warning:

Warning: Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported 

My use case is that I wanted to render React Test Renderer (for ex) from a Component in an another (ReactDOM) renderer but it does not seem to work - I wanted to use same Provider in both containers.

I thought React.createContext create objects with no state and could be shared across renderers / Fiber containers… Is there workaround for this? Are there any thoughts on this, Is this a definite behaviour?

Following the warning, I eventually get the error message which I believe is related to the warning:

Uncaught Error: Unexpected object passed to ReactTestInstance constructor (tag: 13). This is probably a bug in React.

thank you for any guidance 😃

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:9 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
sahrenscommented, Jun 10, 2018

@gaearon: works after upgrading to 16.4 😃

0reactions
stereoboostercommented, Jun 27, 2018

For future searchers. I see this error with enzyme https://github.com/stereobooster/react-context-issue (I guess this is not an issue in React itself)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Invariant Violation: Objects are not valid as a React child
This error usually happens because a function involved in dispatching an event has been given an unexpected object type (i.e passing an object...
Read more >
Error Boundaries - React
Error boundaries catch errors during rendering, in lifecycle methods, and in constructors of the whole tree below them. Note. Error boundaries do not...
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 >
scripts/error-codes/codes.json - React - Fossies
226 "225": "Unexpected object passed to ReactTestInstance constructor (tag: %s). This is probably a bug in React.
Read more >
How and Why to Bind a Callback Function in React Components
Avoid binding by using the public class fields syntax, or bind your callbacks inside the constructor. Why we Need to Bind: The Basics...
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