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

Reflux.connect not updating state for mounted component #226

Closed
fk1blow opened this Issue Feb 5, 2015 · 8 comments

Comments

Projects
None yet
8 participants
@fk1blow

fk1blow commented Feb 5, 2015

I am using Reflux.connect to sync the store with the component. Ok, everything works fine until
i add an async operation inside the store.

If i update the store state(this.trigger(storeData)) before the component was mounted,
the state of the component is the correct/expected one. If i mount the component, then
update the store(this.trigger(storeData)), the expected value will be incorrect.

Is the Reflux.connect working in ways that i cannot seem to understand properly? Do i need
to use this.listenTo(store) for this kind of operations?

@spoike spoike added the bug label Feb 12, 2015

@pstadler

This comment has been minimized.

Show comment
Hide comment
@pstadler

pstadler Mar 17, 2015

Same problem here. Needed to do a workaround using ListenerMixin.

pstadler commented Mar 17, 2015

Same problem here. Needed to do a workaround using ListenerMixin.

@jeffdonthemic

This comment has been minimized.

Show comment
Hide comment
@jeffdonthemic

jeffdonthemic Mar 30, 2015

I'm encountering this same issue as well. I used ListenerMixin to work around it.

jeffdonthemic commented Mar 30, 2015

I'm encountering this same issue as well. I used ListenerMixin to work around it.

@spoike

This comment has been minimized.

Show comment
Hide comment
@spoike

spoike Apr 7, 2015

Member

This sounds a little bit like a problem another user had, which was due to the wrong data being sent from getInitialState.

Do you have any code example that reproduces this?

Member

spoike commented Apr 7, 2015

This sounds a little bit like a problem another user had, which was due to the wrong data being sent from getInitialState.

Do you have any code example that reproduces this?

@jeffdonthemic

This comment has been minimized.

Show comment
Hide comment
@jeffdonthemic

jeffdonthemic Apr 7, 2015

Here's the store's init and the view component. If I return the same objects synchronously, it works like a champ.

jeffdonthemic commented Apr 7, 2015

Here's the store's init and the view component. If I return the same objects synchronously, it works like a champ.

@ladas-larry

This comment has been minimized.

Show comment
Hide comment
@ladas-larry

ladas-larry May 19, 2015

Happens to me as well.

ladas-larry commented May 19, 2015

Happens to me as well.

@ecastano

This comment has been minimized.

Show comment
Hide comment
@ecastano

ecastano Sep 5, 2015

Thanks @jeffdonthemic! I was running into the same issue.... your workaround helped me out.

ecastano commented Sep 5, 2015

Thanks @jeffdonthemic! I was running into the same issue.... your workaround helped me out.

@promethe42

This comment has been minimized.

Show comment
Hide comment
@promethe42

promethe42 Oct 19, 2015

I have the same issue. Any progress on this?

promethe42 commented Oct 19, 2015

I have the same issue. Any progress on this?

@BryanGrezeszak

This comment has been minimized.

Show comment
Hide comment
@BryanGrezeszak

BryanGrezeszak Dec 2, 2016

Contributor

Spoike asked for a code example to reproduce the issue, and seeing as nobody has given one in over a year and a half I'm gonna consider this not an active issue any more. If you have a similar issue, post it new and please include minimal code possible to reproduce.

Contributor

BryanGrezeszak commented Dec 2, 2016

Spoike asked for a code example to reproduce the issue, and seeing as nobody has given one in over a year and a half I'm gonna consider this not an active issue any more. If you have a similar issue, post it new and please include minimal code possible to reproduce.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment