Want more egghead?

This lesson is for members. Join us? Get access to all 3,000+ tutorials + a community with expert developers around the world.

Unlock This Lesson

Already subscribed? Sign In

Autoplay

    Customize Babel to Build a React App with Poi

    John LindquistJohn Lindquist

    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.

    reactReact
    webpackwebpack
    Code

    Code

    Become a Member to view code

    You must be a Member to view code

    Access all courses and lessons, track your progress, gain confidence and expertise.

    Become a Member
    and unlock code for this lesson
    Transcript

    Transcript

    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.

    Discuss

    Discuss