From what I can see, the dispatchAction function is bound with the first two arguments, to become (for example) a setState function. This setState function can be called at any time; it doesn't need to be (and actually should not be) called within the body of a function component.
Fixes #19
From what I can see, the
dispatchAction
function is bound with the first two arguments, to become (for example) asetState
function. ThissetState
function can be called at any time; it doesn't need to be (and actually should not be) called within the body of a function component.Therefore, in
dispatchAction
, it doesn't make sense to make the assertion thatgetCurrentIdentity()
makes: https://github.com/FormidableLabs/react-ssr-prepass/blob/35fb629b99a7c608f795fa43f577ca7ba63fb192/src/internals/dispatcher.js#L26-L39To prevent that assertion from happening inside
dispatchAction
, we can accesscurrentIdentity
directly.