From 1dc081f8cf51fb9ba7bd1371637c76ccf246558a Mon Sep 17 00:00:00 2001 From: Yoshua Wuyts Date: Thu, 8 Sep 2016 15:29:40 +0200 Subject: [PATCH] feature(hooks): log initial state --- index.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/index.js b/index.js index b261e2f..68d530c 100644 --- a/index.js +++ b/index.js @@ -151,6 +151,9 @@ function dispatcher (hooks) { // state rather than indvidual chunks, so we apply it outside the loop if (!stateCalled && opts.state !== false) { _state = wrapHook(_state, initialStateWraps) + if (onStateChangeHooks.length) { + applyHook(onStateChangeHooks, {}, _state, {}, 'init', createSend) + } } if (!opts.noSubscriptions) subsCalled = true