We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi Alexey, I have some trouble with use option. My code was:
use
<Layer id="my-id"> {() => <MyComponent item={item} />} </Layer>
But MyComponent did not get changed after update parent's property item from item.children = ['a'] to item.children = ['a', 'b'].
MyComponent
item
item.children = ['a']
item.children = ['a', 'b']
I have fixed that by this code:
<Layer id="my-id" use={item.children}> {() => <MyComponent item={item} />} </Layer>
May be it should be more predictable here. For example, always return true in shouldComponentUpdate (https://github.com/fckt/react-layer-stack/blob/master/src/components.js#L61) if there is no use parameter defined by user and there is no way to detect children props changes. What do you think?
true
shouldComponentUpdate
The text was updated successfully, but these errors were encountered:
good points! I'm on the same page 👍
Sorry, something went wrong.
No branches or pull requests
Hi Alexey,
I have some trouble with
use
option. My code was:But
MyComponent
did not get changed after update parent's propertyitem
fromitem.children = ['a']
toitem.children = ['a', 'b']
.I have fixed that by this code:
May be it should be more predictable here.
For example, always return
true
inshouldComponentUpdate
(https://github.com/fckt/react-layer-stack/blob/master/src/components.js#L61) if there is nouse
parameter defined by user and there is no way to detect children props changes.What do you think?
The text was updated successfully, but these errors were encountered: