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

Update component properties when react props were updated #14

Open
sasha240100 opened this issue Feb 4, 2018 · 0 comments
Open

Update component properties when react props were updated #14

sasha240100 opened this issue Feb 4, 2018 · 0 comments

Comments

@sasha240100
Copy link
Member

sasha240100 commented Feb 4, 2018

At the moment react-whs doesn't support updating component properties from React properties. Changing them will result in a component rebuild.

Such feature can be implemented. Using componentWillReceiveProps() we can compare prevProps with props and update only WHS.Component parameters that were changed in React component.

Such updating methods can be:

  • .build() (When unique property of custom component was changed)
  • .wrap() (Any transformations were changed)

But overall, I would recommend updating component.native values specific to each property to increase performance.

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

1 participant