React Playground
Repo to learn and try out React.
This project was bootstrapped with Create React App.
Setup
Install dependencies
npm install
Run development server
npm start
Run tests
npm test
Build for production
npm run build
Can also use yarn
instead of npm
.
Components
Welcome
src/components/Welcome
- Basic React Component (function) with
props
,propTypes
anddefaultProps
. - Renders "Hello {name}!" or "Hello World!" if name property is not provided.
Clock
src/components/Clock
- Basic React Component (class) demonstrating use of
constructor
,state
, lifecycle methods (componentDidMount
&componentWillUnmount
).
Counter
src/components/Counter
- React Component demonstrating event handling and conditional rendering.
TicTacToe
src/components/TicTacToe
- Implementation of tic-tac-toe game guided by official React tutorial.