Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Comment out warnValidStyle for fiber development
This function looks at react-stack internals which to not work on react-fiber. Comment it out.
- Loading branch information
e7e91f5
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was originally copied from
CSSPropertyOperations
inreact-dom
so I could avoid reaching intoreact-dom/lib/*
. Do you think it would be worth exposing that inreact-dom
's secret "don't fire" thing to avoid this kind of divergence from happening again as React DOM is developed?e7e91f5
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, I think I need to dig into this a bit more.
The code in react-native looks largely identical. As far as I can tell, react-dom fiber bypasses this because when it calls
CSSPropertyOperations.setValueForStyles()
, it omits the third argument (component
).react-native-web's UIManager passes component._reactInternalInstance unconditionally.
Fiber does set
_reactInternalInstance
internally, is in src/renderers/shared/fiber/ReactFiberClassComponent.js, so I guess that's how react-native-web trips this but fiber dom does not.Also of note, is that the
Fiber
components should have a dev-only attribute,_debugOwner
. It may be possible to do something terrible like:owner = component._debugOwner || (component._currentElement && component._currentElement._owner) || undefined
to try to handle fiber, but I haven't played with or tested this.