You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I’m also using your starter kit lovli.js but I’m having issues trying to reconnect with Horizon when the connections is interrupted. Right now the page goes blank when the connection is lost.
Any advice on how to reconnect with Horizon?
The text was updated successfully, but these errors were encountered:
It was also mentioned in the lovli.js repo yesterday (flipace/lovli.js#16 (comment)) and I'll probably implement a small addition/change in horizon-react in order to make this easier.
i quote myself here: "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..."
Thanks for your answer @flipace. I have implemented the loadingComponent and now I can display a message when the app is disconnected from Horizon. However, I would love to have a way to automatically reconnect again without refreshing the page. My ideal scenario would be:
App connects with Horizon server
In case of a disconnection horizon-react should try to reconnect several times automatically
While horizon-react is trying to reconnect, the app should display the same content it had before loosing connection (we can show a message saying the connection has been lost if the user tries to load or submit data)
If the reconnection is successful the App component should be re-rendered
If the reconnection fails after x number of attempts a msg should be displayed.
I’m studying the code to better understand what’s happening under the hood and in case I come up with a solution I will let you know. Thxs again 💯
Great detailed description of your wanted behaviour. I actually think we could really add this to horizon react since the data and queries are "cached" already..
Will think more about it when my kids are asleep 😉
@flipace thanks for this great project.
I’m also using your starter kit lovli.js but I’m having issues trying to reconnect with Horizon when the connections is interrupted. Right now the page goes blank when the connection is lost.
Any advice on how to reconnect with Horizon?
The text was updated successfully, but these errors were encountered: