You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The second time you click to show the popover, React throws:
Invariant Violation: replaceProps(...): You called setProps or replaceProps on a component with an owner. This is an anti-pattern since props will get reactively updated when rendered. Instead, change the owner's render method to pass the correct value as props to the component where it is created.
is executed, it calls .replaceProps on the old content component, which throws because its __owner__ is the PopoverDemo component, despite that PopoverDemo only creates the component, but doesn't actually mount it:
return<BsPopovercontent={<div>The time is <Time/>.</div>}/>;
I've concluded that __owner__ is the wrong thing for .replaceProps to check. Instead, some property should be set on each child component upon mounting, probably by ReactMultiChild.Mixin.mountComponent. (Or conversely, on each root component by ReactComponent.Mixin._mountComponentIntoNode.)
The text was updated successfully, but these errors were encountered:
Take a look at this component:
http://jsfiddle.net/spicyj/PLcWJ/
The second time you click to show the popover, React throws:
This happens because the second time the line
is executed, it calls
.replaceProps
on the oldcontent
component, which throws because its__owner__
is the PopoverDemo component, despite that PopoverDemo only creates the component, but doesn't actually mount it:I've concluded that
__owner__
is the wrong thing for.replaceProps
to check. Instead, some property should be set on each child component upon mounting, probably byReactMultiChild.Mixin.mountComponent
. (Or conversely, on each root component byReactComponent.Mixin._mountComponentIntoNode
.)The text was updated successfully, but these errors were encountered: