Inject React component state declaratively
npm install @react-mock/stateInject React component state declaratively.
> StateMock must be the direct parent of the stateful component for the state injection to work.
``js
import { StateMock } from '@react-mock/state';
render(
);
``
> Warning: StateMock delays ref calls. This means refs can get called _after_ componentDidMount, instead of before as you might expect.