O'Reilly logo

Mastering React by Ryan Vice, Adam Horton

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Starting the app

We will begin exploring the construction of the application in detail in the next chapter. To finish up here, we'll lay the groundwork for file structure, and stub out the main views. We'll boot up our dev server and mock back-end, then add some linking between views using React Router.

The directory structure

Make a directory structure that looks like this:

The directory structure

If you are using a POSIX shell (such as Bash, the default shell on Mac OSX), here are a couple of commands to quickly create the directory structure:

mkdir -p db css/{components,vendor,views} js/{components,mixins,stores,vendor,views}
mkdir -p {css,js}/{components,views}/{users,posts} ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required