We’re using React
a fair bit these days here at Little Weaver. React has a lot of surrounding
ecosystem (ES6, Babel, webpack, ImmutableJS, redux, JSX, etc…). Not all of this
is necessary to use React. At its core, React is simply a library for user
interfaces. It’s the “View” in Model View Controller (more or less). However, a
lot of React tutorials use a lot of these surrounding tools. They can be tricky
to setup. So instead, here’s a repo to get started with. At Little Weaver we
like to use React with ES6 (ECMAScript 2015/newer version of JavaScript).
Unfortunately, not every browser supports all the ES6 features. As such, we
have to “transpile” ES6 features into features that older browsers support.
This is accomplished with babel
and webpack
. But you don’t need to worry
about that here if I’ve done my job correctly.
node
is a JavaScript runtime that lives outside of the browser. The build
tools in this repo use node
, so we need it installed alongside npm
. npm
is a package manager for node
JS packages — akin to pip
in the Python world.
Use nvm-windows. Install the
latest stable version of node
with nvm install latest
. This will come with
npm
.
Use nvm. Install the latest stable version
of node
with nvm install node
. This will come with npm
.
Ping Emily if something goes wrong.
git clone [email protected]:littleweaver/react-sandbox.git
cd react-sandbox
npm install
npm run start
Open http://localhost:8080
in your browser!