React on window size change
Refactoring index.js