-
Notifications
You must be signed in to change notification settings - Fork 3
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
Fix duplicate key issue #61
Comments
I'm open to another backend. Just to talk this particular problem through, is there a way to handle the Firebase events in the stores vs. in the components? Then components would just get their state from the stores. One idea would be to fire an event on channel's being joined / left that would propagate through to the stores and toggle the relevant Firebase listeners. |
Yeah. So we should definitely move Alternatively they could just go in the actions (the JOIN action would start listening and the LEAVE action would remove the listener). That makes the most sense to me since they're not necessarily connected to any one particular store. This discussion is good http://stackoverflow.com/questions/26632415/where-should-ajax-request-be-made-in-flux-app |
So the immediate issue is having to remove the listener. We could have ChannelMessage.willComponentMount() call a method on MessageStore that could do something like:
|
Warning: flattenChildren(...): Encountered two children with the same key. Child keys must be unique; when two children share a key, only the first child will be used.
See Satish's explanation here #21 .This is already like the third time we've had to make our code more complicated to accommodate Firebase's weird events. How are people feeling about continuing with it? I don't think it would take that much more work to roll our own backend. We need a document store with a WebSocket connection and an event listener. I still have a slight preference for Elixir or Clojure, but I'd be fine doing it in JS if people are more comfortable with that and don't want to be distracted from learning React.
The text was updated successfully, but these errors were encountered: