Skip to content
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

Replace the internal data store variables with immutable collections #21

Open
jacknoble opened this issue Mar 17, 2015 · 7 comments
Open

Comments

@jacknoble
Copy link
Collaborator

from https://github.com/facebook/immutable-js

@rorysaur
Copy link
Owner

👍

@jacknoble jacknoble assigned jacknoble and unassigned jacknoble Mar 29, 2015
@jacknoble
Copy link
Collaborator Author

It may not be strictly necessary but this library is written in ES6 and all the documentation/examples use ES6. What do we think about switching? Personally I'd like to do it after we develop a bit more, I think it would be a good way to learn to convert a whole app over.

@rorysaur
Copy link
Owner

yes i would like to ES6 with a transpiler like babelify.

@satishkunisi
Copy link
Collaborator

This relates to #60 and the 'two children with the same key' warning. Currently:

  1. ChannelMessages init's listenForNewMessages for target channel
  2. MessageStore listens for the NEW_MESSAGE action
  3. MessageStore adds each message to the store
  4. ChannelMessages unmounts, then remounts firing listenForNewMessages again
  5. MessageStore again receives the NEW_MESSAGE action and adds the duplicate messages to the store

Either loading messages all at once or checking for dups would seem to fix this issue.

@satishkunisi satishkunisi mentioned this issue Apr 4, 2015
@jacknoble
Copy link
Collaborator Author

Ohhhh, that explains it. Nice job tracking it down. Fucking firebase...

@rorysaur
Copy link
Owner

rorysaur commented Apr 4, 2015

why does it unmount and remount?

@satishkunisi
Copy link
Collaborator

When the router transitions to another component the current component
unmounts. It remounts when you transition back to it. Chat -> About -> Chat

On Friday, April 3, 2015, Rory Ou [email protected] wrote:

why does it unmount and remount?


Reply to this email directly or view it on GitHub
#21 (comment).

Sent from Gmail Mobile

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

No branches or pull requests

3 participants