score:1

can't see why you would need that, but you could do something like this:

window.testing_one = (params) => {
  reactdom.render(
    <app {...params} />,
    document.getelementbyid('root')
  );
};

then you can manually call testing_one({some: 'params'}); in console.

better way would be do the testing in test environment where you can do the same thing easier. see something like: https://medium.com/selleo/testing-react-components-best-practices-2f77ac302d12


Related Query

More Query from same tag