How to use react-test-renderer/shallow with typescript?
You can only use import ShallowRenderer from 'react-test-renderer/shallow';
if it is default exported. It looks like it is not default exported so that you can't use the above syntax. You can import it as
import * as ShallowRenderer from 'react-test-renderer/shallow';
Now, to create a ShallowRenderer
you can call the method ShallowRenderer.createRenderer()
const myShallowRenderer = ShallowRenderer.createRenderer();
You can read more about it here.
Hope it helps :)