flipace / lovli.js

A boilerplate for developing react+redux applications with rethinkdb/horizon as realtime database and express for the server.
MIT License
558 stars 35 forks source link

Reconnection? #16

Closed grigio closed 7 years ago

grigio commented 8 years ago

Thanks for this project, where should the reconnection be handled at react container? or horizon client? Because currently I just get a blank page if the client lose the connection with the server

reddhouse commented 8 years ago

@grigio I think there is some discussion on this at the horizon repo: https://github.com/rethinkdb/horizon/issues/595

flipace commented 8 years ago

i leave this issue open in case something needs to be changed when reconnection is there.

nervestaple commented 8 years ago

@flipace we're having this issue too. reconnecting would be nice, but chiefly i'm concerned about how to keep rendering everything inside the HorizonConnector in the event of disconnect. i wish the site didn't just disappear! any way around this or quick fix i could make?

flipace commented 8 years ago

@nervestaple this issue is related to horizon-react and the way the connector works.

as a possible workaround you can provide a prop "loadingComponent" which would be rendered in case of connection loss. alternatively we could implement a new prop which would prevent the connector from intervening when the connection is lost...

(also see: https://github.com/flipace/horizon-react/blob/master/src/components/Connector.js)

nervestaple commented 8 years ago

sorry yeah just realized this should have gone in horizon-react repo. let me look into this!