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
reconnection:true, // (Boolean) whether to reconnect automatically (false)
59
59
reconnectionAttempts:5, // (Number) number of reconnection attempts before giving up (Infinity),
60
60
reconnectionDelay:3000, // (Number) how long to initially wait before attempting a new (1000)
@@ -189,6 +189,50 @@ actions: {
189
189
190
190
Use the `.sendObj({some: data})` method on the `$socket` object to send stringified json messages.
191
191
192
+
##### Custom socket event handling
193
+
194
+
Provide you own custom code to handle events received via the `passToStoreHandler` option. The function you provide will be passed the following arguments:
195
+
196
+
1. event name
197
+
2. event
198
+
3. original/default handler code function `function (eventName, event)`. This allows you to optionally do some basic preprocessing before handing the event over to the original handler.
199
+
200
+
The original passToStore code is used if no `passToStoreHandler` is configured.
201
+
202
+
Here is an example of passing in a custom handler. This has the original passToStore code to give you an example of what you can do:
0 commit comments