

The overly-simplified definition of JSX (JavaScript with XML) is that it allows us to write far more concise and easily readable React code, including standard html, in our JavaScript, read more. We’re going to add an exception to the rules at this point, we’re going to tell eslint not to complain when we write JSX in a. Let’s run the tests as a sanity check to make sure everything has gone according to plan. Herein lies part of the magic, it’s simply a package that has all the most essential packages as its dependents and provides scripts to run common tasks. If you have a look in the package.json you will notice that the only production dependencies are the react library and react-dom to render it, and the only dev dependency is something called react-scripts.

Then let’s change in to that directory and install the node packages we need: cd my-react-todolistnpm install This will create a react app in the my-react-todolist/ folder relative to wherever we are. In the command line let’s go to the parent directory of where we want to create our app then run the following: Then install the create-react-app package globally: Make sure you have the latest node and npm installed. Files of note will be the _package.json_ and contents of the _config/_ and _scripts/_ folder. You can have a look at what create-react-app actually does behind the scenes in this repo, all I’ve done is scaffolded an app and then run _npm eject_ to expose all the packages, configs and scripts. Even for a production app, my feeling at the moment is that it’s better to use create-react-app and then make the few changes you may want, it’s far more efficient.
