We've had a TODO to maybe inform effects subscribers when Store#setState or Store#setStateDeep are called but don't change state. We've finally figured out the behavior that's needed in this situation.
Short-circuiting is fine when state hasn't changed unless metadata is passed (e.g. setState(newState, metadataHere). When metadata is passed, the action should always proceed to all parent/child stores and notify all effects subscribers of the pseudo-action with its meta property.
Description
We've had a TODO to maybe inform effects subscribers when
Store#setState
orStore#setStateDeep
are called but don't change state. We've finally figured out the behavior that's needed in this situation.Short-circuiting is fine when state hasn't changed unless metadata is passed (e.g.
setState(newState, metadataHere)
. When metadata is passed, the action should always proceed to all parent/child stores and notify all effects subscribers of the pseudo-action with itsmeta
property.