Author: Muriel Gonzalez, Front-End Developer

Looking for some React to play with? I have commented a handful of examples taken from React’s documentation. These examples cover the very basics of React: JSX, props, component level state, and life cycle.

Setup

I’ve embedded a JSFiddle below for you to try out the examples and see them for yourself, without any of the setup. It’s already hooked up with React, ReactDOM, and a container div to render your apps! Open it in a new window, and start writing your JavaScript on the Babel+JSX tab.

A Simple Component

A Stateful Component

An Application

Want to Build Your Own React Apps? Here Are Some References

The following resources are a must-read if you want to get into React development:

  1. React Docs
  2. Redux
  3. React Router 

Feel free to check out some of my personal React repositories below:

  1. React Starter Template
  2. React + Redux examples
  3. React Native + Redux examples