Customize Babel to Build a React App with Poi

John Lindquist
InstructorJohn Lindquist

Share this video with your friends

Send Tweet
Published 4 years ago
Updated 3 years ago

Developing React with Poi is as easy as adding the babel-preset-react-app to a .babelrc and installing React. This lesson will walk you through that quick process and get your React app up-and-running.

Instructor: [00:00] Switching over to React is as easy as installing React and ReactDOM, then, install babel-preset-react app. I like the babel plug-in react require, and save these as devDependencies. I'll delete this, add a babelrc, which poi will automatically pick up.

[00:24] Say my presets are React app, and my plug-ins are React require. Then, go into my index, I'll select all, import from ReactDOM. We'll need to grab the render method. I can skip importing React because of the React require plug-in.

[00:45] Then, say render. We'll pass in a div, say React, and then, we'll get the element by ID of app. Hit save there, run poi, and we have a React app, which will auto-reload anytime I make a change.

Dave Edelhart
Dave Edelhart
~ 4 years ago

is there a repo with the source somewhere?