react-hybrid
react-hybrid copied to clipboard
UIView unable to render with custom parameters
Trying to pass custom parameters into a UIView using the render method as suggested here: https://github.com/ui-router/react/issues/26
<UIView render={(Component, props) => <Component {...props} {...someOtherProps} /> } />
seems that render is not actually working when using react-hybrid? is this a known issue
Having same issue but not able to find where cause the problem...
from the doc
The component finds the state context by looking first via React props, and second via AngularJS DOM data. It then provides the state context to its children using React props.
So I guess it should get react props?
Tried react context. Looks like it will also break the context, so it can only get default context but not value props in provider.
So here is my finding about this.
-
Component wrapped in UIView here is actually going to copy context then make a stand alone component tree. so after render, parent component(containing UIView) and child component(inside UIView) is not in the same tree and so disconnected. That why <Context> isn't work here.
-
<UIView> only feed in state config and className(I guess) into component.