barba icon indicating copy to clipboard operation
barba copied to clipboard

Are global `once` hooks available?

Open stefanobartoletti opened this issue 3 years ago • 1 comments

Like the title says, are beforeOnce, once, and afterOnce global hooks available?

stefanobartoletti avatar Aug 03 '22 15:08 stefanobartoletti

I think that I managed to solve this, without actually doing nothing special.

The barba.hooks.afterEnter and barba.hooks.beforeEnter are fired also at once, so there is no need for separate global hooks.

stefanobartoletti avatar Sep 08 '22 14:09 stefanobartoletti

Hello @stefanobartoletti,

Sorry for the late reply, but it's a yes! 😄

Note that the beforeEnter and afterEnter are called at once stage, while beforeOnce and afterOnce are only called once, so there is a need to have both.

xavierfoucrier avatar Nov 22 '22 14:11 xavierfoucrier