#Wrapping all loaders/actions

1 messages · Page 1 of 1 (latest)

rustic topaz
#

Is it possible to wrap every loader/action in some function? I am looking to wrap all my loaders in a asyncLocalStorage.run(store, loader/action) and would prefer not to do this manually for each loader.

#

Wrapping all loaders/actions

little tide
#

If you're using a custom server yes

rustic topaz
rich ravine
#

So were you able to wrap? I made an Express middleware that has asyncLocalStorage.run(store, () => next()), but I asyncLocalStorage.getStore() gives me undefined.