Unset State

Clean a specific key from fetch state

Example#

import { getState, unsetState } from '@rebased/state';
console.log(getState());
// { _fetch: { name: 'John', age: 34 }}
unsetState('age');
console.log(getState());
// { _fetch: { name: 'John' }}