DEV Community

Conor Murphy
Conor Murphy

Posted on

How to position and resize window that is opened by React

When you start a React App, a browser window is opened to display the application's content. How can I change the position and dimensions of that window before it opens? I have tried window.moveTo(0,0) and window.resize(216, 985) within the componentDidMount method (older version of React) of the App.js file, but neither works. Please let me know if you have any other thoughts that does not require rebuilding the application using an additional framework or library.

Top comments (0)