Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UIView unable to render with custom parameters #37

Open
billycrid opened this issue May 11, 2018 · 3 comments
Open

UIView unable to render with custom parameters #37

billycrid opened this issue May 11, 2018 · 3 comments

Comments

@billycrid
Copy link

Trying to pass custom parameters into a UIView using the render method as suggested here: ui-router/react#26

<UIView render={(Component, props) => <Component {...props} {...someOtherProps} /> } />

seems that render is not actually working when using react-hybrid? is this a known issue

@waitingduck
Copy link

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?

@waitingduck
Copy link

Tried react context. Looks like it will also break the context, so it can only get default context but not value props in provider.

@waitingduck
Copy link

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 isn't work here.

  • only feed in state config and className(I guess) into component.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants