Search code examples
callbacksimperium

Can a Simperium bucket have multiple callbacks of the same type


I'm using Simperium (JS, on the client), and I have a situation where I need to register multiple ready handlers: one that marks the container I'm storing the data in as finished loading (so I can display it to the user), and another that checks if the currently active route matches one of the objects we just loaded, and re-runs the route handler if that is the case.

The thing is, using bucket.on(signal, handler) seems to overwrite the first applied handler with the second.


Solution

  • Only a single handler is supported at the moment. We'd welcome any feedback on this though.