create shallow copy of state object before attaching it to Context instance