Skip to content

Problems using renderSubtreeIntoContainer #4301

Closed
@slorber

Description

@slorber

I don't know if this is the correct way to integrate this new "hidden feature" but I used.

var renderSubtreeIntoContainer = require("react-dom").unstable_renderSubtreeIntoContainer;

This is used on an existing app migrating from 0.13 to 0.14. I have tooltips that are portals (using Hubspot/DropJS) in which I render React components. The rendered content make use of React context. As context this has changed I can't use owner content anymore and must use renderSubtreeIntoContaine to make the context available. (see #4081)

At first I got a stacktrace from ReactBrowserEventEmitter.ensureScrollValueMonitoring because ReactBrowserEventEmitter.ReactEventListener was undefined. I don't know why I don't get it anymore, and my tooltips are efficiently displayed (at first I was requiring "react/lib/renderSubtreeIntoContainer" but don't think this is a reason right?)

But then my tooltips are displayed and works fine.
These tooltips can be hovered and clicked to trigger actions. This also works fine.

But there's a strange thing now: I've found a tooltip that, when hovered, produce a lot of errors. The tooltip that produces these errors is the on the first item of a list (for example, imagine a todo list, and the first todo have an attribute with a tooltip on hover -> only this tooltip causes the errors).

The stacktrace is:

Uncaught Error: Invariant Violation: 
ReactMount: Two valid but unequal nodes with the same `data-reactid`: .0.0 appLibs.js:59549
invariant appLibs.js:59549
getID appLibs.js:52190
handleTopLevelWithPath appLibs.js:51122
handleTopLevelImpl appLibs.js:51073
Mixin.perform appLibs.js:57834
ReactDefaultBatchingStrategy.batchedUpdates appLibs.js:49769
batchedUpdates appLibs.js:56046
ReactEventListener.dispatchEvent

Any idea?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions