updateState

Updates the computation's state given the previous state and the event whose path matches the path being observed.

This function must return the new computation state which, unless it hasn't changed, should be different (equals-wise) from the previous computation state (as such, when using an object as state, a new instance should be returned when the state is updated). If the new state differs from the old one (using equals), a re-computation will be scheduled.