onState
Wraps the StorePlugin.onState method of the child plugin passed in the block parameter.
The child's StorePlugin.onState method will not be invoked unless you manually call StorePlugin.onState inside this block.
For pre-context parameters version, to correctly call the child method, use child.run { onState(old, new) }
The return value of block will mean what the state will be set to, i.e. the end value. Use null
to not change the state. Use the return value of child.onState
to delegate the result.
See the DecoratorBuilder documentation for details on how this function behaves.