moved react to js file