Also this tutorial should offer you a complete introduction to react and babel config the right way.
https://www.valentinog.com/blog/babel/