The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

Jim Haungs (9) [Avatar] Offline
#1
I'm an experienced Rails and Javascript developer, but new to React.

It took me hours to set up babel because it would not parse the JSX syntax. The problem was that the authors neglected to mention the .babelrc file, which needs to live in the app directory; once I added it, the translation from JSX to JS worked fine.

The file needs to contain, at minimum, the following text:

{
"presets": ["react"]
}
Azat Mardan (41) [Avatar] Offline
#2
Thanks. It's mentioned in Appendix but maybe you didn't have it with MEAP. Generally, you don't need babelrc because we use package.json configuration for Babel in this book. The instructions are in chapter 3 and Appendix A.

---

Azat, author of React Quickly