- 
                Notifications
    You must be signed in to change notification settings 
- Fork 10
Open
Description
Hi Alexey,
I have some trouble with use option. My code was:
<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'].
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?
Metadata
Metadata
Assignees
Labels
No labels