From 9d3c13a9705fe5ce6b7ce568bdd95a4d56455b73 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 74a6a9b..9e11554 100644 --- a/index.js +++ b/index.js @@ -158,6 +158,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