rintoj / statex

StateX is a state management library for modern web applications with unidirectional data flow and immutable uni-state (just like redux)
MIT License
68 stars 18 forks source link

Selectors Broken in *ngFor Components #5

Closed thatcort closed 6 years ago

thatcort commented 6 years ago

I have a component with a simple state selector. When I instantiate that component using an *ngFor directive the selector only works in the first created component and not in any of the rest.

A test case is attached. The test case is a variation on the example TODO list app. I added a state variable called global that is referenced both on the list component and on each of it's children. The children are instantiated using an *ngFor and the selector doesn't work in most of the children.

statex_selector_issue.zip

rintoj commented 6 years ago

Hey,

Thanks for your mail. I will take a look.

Regards, Rinto

On 10-Jan-2018, at 10:25 PM, thatcort notifications@github.com wrote:

I have a component with a simple state selector. When I instantiate that component using an *ngFor directive the selector no longer works.

A test case is attached. The test case is a variation on the example TODO list app. I added a state variable called global that is referenced both on the list component and on each of it's children. The children are instantiated using an *ngFor and the selector doesn't work.

statex_selector_issue.zip https://github.com/rintoj/statex/files/1619699/statex_selector_issue.zip — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/rintoj/statex/issues/5, or mute the thread https://github.com/notifications/unsubscribe-auth/AKUsx67DNHGixmGxqNWpvEpaZVjiLIZ2ks5tJOt5gaJpZM4RZoXD.

rintoj commented 6 years ago

@thatcort, issue fixed with version 1.1.2