src directory, there's a mix of
.jsx files. I'm using
.jsx when there's jsx templating in the file,
which allows Emacs to automatically indent these sections
correctly using web-mode.
made possible by Babel.
You'll see the string
.eslintrc - this denotes
features added to ecmascript 6 in 2015, which turn out to
be the essential ones I've been using, like import / export /
Testing is done with Jest - I figured it would be the most straight-forward to use because Facebook specifically built it to test React applications. It's just a unit-testing framework though, like QUnit or Mocha.
A key concept about making a React application is the balance
of "state" vs "props". This was covered in
Thinking in React, and the guideline is to
identify which components depend on which pieces of state,
and put that state in one place: the nearest common parent.
In my application that turns out to be the root class: