Missing onOpen function in v2
See original GitHub issueBug report
Describe the bug
In v1 we had a function called onOpen
, which called a callback whenever the websocket was first established or reconnected.
When I use my app with Supabase I have some disconnections and I listen for reconnection events in order to refetch pobbile stale data. It was so useful.
In V2 it is missing and I’ve not found any new implementation, nor it is mentioned in docs.
At the actual state for me it’s a regression.
Is there a reason for its removal?
I don’t think it could create race-conditions or other issues.
To Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository:
- Go to ‘…’
- Click on ‘…’
- Scroll down to ‘…’
- See error
Expected behavior
Expect that onOpen
is still present in V2 or at least a valid implementation of the old behaviour
Screenshots
Screenshot not needed I think
System information
Not needed. The implementation is not found in the source code
Additional context
PR that changed this behaviour: #194
Issue Analytics
- State:
- Created a year ago
- Comments:6 (4 by maintainers)
@w3b6x9 Haven’t tried yet but I think it does what I’m looking for. Also provides a more granular refetching method.
Will test and reopen if something goes wrong
Thanks
@kiwicopple good call! will do.