put reactjs code in another file