src code

instance method Spah.State#reduce

Spah.State#reduce([useReducers]) → Spah.State

useReducers (Array): An optional array of reducer objects to be used instead of those already registered on this state instance.

Creates a clone of this state instance and applies all reducer strategies specified with #addReducer to the clone. Returns the reduced clone. See #addReducer for details of reducer strategies.

This method will be called by the Spah Client any time the state is about to be sent up the wire to the Spah Server.