prism.target(state)
Returns the original unwatched object.
This function is the same as in onChange
.
Enables destructuring the state
state
(object): The object that you are listening to
state
(object): The original object that was passed to init
import * as prism from 'state-prism'
import state from './state'
const unwatchedState = prism.target(state)
// Now possible to destructure state
const { x, y } = unwatchedState