You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently a component with state interacts with the closest store that is connect to on of the component's ancestors. This is probably what the user wants in some cases, but it is a all-or-nothing: None of the keys from other stores are available.
Expectation: It would be nice, if the closer store does not completely shadow others, but that the shadowing takes place on the level of individual keys.
Example
constChild=withState('foo')(({foo, answer})=>{return(<div>{`foo: ${foo} and answer: ${answer}`}</div>);});constFather=connect(()=>{return(<Child/>)},{foo: 'bazzz'});constApp=()=>{return(<Father><Child/></Father>)}constGrandfather=connect(App,{foo: 'bar',answer: 42});
This currently renders "foo: bazzz and answer: undefined" because Child only has access to the nearest store. With partial store shadowing, this example should render "foo: bazzz and answer: 42".
The text was updated successfully, but these errors were encountered:
Currently a component with state interacts with the closest store that is connect to on of the component's ancestors. This is probably what the user wants in some cases, but it is a all-or-nothing: None of the keys from other stores are available.
Expectation: It would be nice, if the closer store does not completely shadow others, but that the shadowing takes place on the level of individual keys.
Example
This currently renders "foo: bazzz and answer: undefined" because Child only has access to the nearest store. With partial store shadowing, this example should render "foo: bazzz and answer: 42".
The text was updated successfully, but these errors were encountered: