React

A JavaScript library for building user interfaces

reactjs.org, GitHub

Learn

Key elements

  • JSX is a syntax extension to JavaScript. It is recommended to use it with React to describe what the UI should look like. JSX produces React “elements”.

Quickstart

# create the application and launch it (starts the development server)
npx create-react-app my-app
cd my-app
npm start

# later on...

# bundles the app into static files for production
npm run build

# starts the test runner
npm test

# removes the tool and copies build dependencies, configuration files and scripts into the app directory (no coming back)
npm run eject

Tutorials

Books

Testing

Jest

Jest is a delightful JavaScript Testing Framework with a focus on simplicity.

jestjs.io (Testing React Apps)

Install dev dependancies: testing-library/react, testing-library/jest-dom

npm install --save-dev @testing-library/react @testing-library/jest-dom

Last updated