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
Hi,
We don't use Flux for our application, but still had to hook into it to receive stormpath events for login/logout etc.
While it wasn't a big deal, it required digging around the sources to see what evens were generated and how to get hold of the dispatcher itself. It would be nice if an example was provided?
In case someone else is wondering the same, what we ended up doing was something like this:
importstormpath,{context,constants}from'react-stormpath';// Initializing stormpath initializes the context, which has the dispatcher...stormpath.init();// Which is returned via getDispatcher on the contextvardispatcher=context.getDispatcher();// And then use register to listen to events dispatcheddispatcher.register((data)=>{const{ options, type }=data;if(type===constants.USER_SET){...}});
The text was updated successfully, but these errors were encountered:
Hi,
We don't use Flux for our application, but still had to hook into it to receive stormpath events for login/logout etc.
While it wasn't a big deal, it required digging around the sources to see what evens were generated and how to get hold of the dispatcher itself. It would be nice if an example was provided?
In case someone else is wondering the same, what we ended up doing was something like this:
The text was updated successfully, but these errors were encountered: