ReactJS | Cookbook

Inhaltsverzeichnis [Anzeigen]

General Readings

Create App

Run the following commands to create a new React Native project called “app-getting-started”:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
npx create-react-app app-getting-started
cd app-getting-started
npx create-react-app app-getting-started cd app-getting-started
npx create-react-app  app-getting-started
cd app-getting-started

Start App

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
npm start
npm start
npm start

Add Typescript Support

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
yarn create react-app app-getting-started-with-typescript --folder-name
cd app-getting-started-with-typescript
yarn create react-app app-getting-started-with-typescript --folder-name cd app-getting-started-with-typescript
yarn create react-app app-getting-started-with-typescript --folder-name
cd app-getting-started-with-typescript
Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
yarn add typescript @types/node @types/react @types/react-dom @types/jest
yarn add typescript @types/node @types/react @types/react-dom @types/jest
yarn add typescript @types/node @types/react @types/react-dom @types/jest

Testing: Tools and Frameworks

ReactJS related

  • React Testing Utilities – Home
  • Jest – Delightful JavaScript Testing Framework with a focus on simplicity – Home
  • Jasmine – Home | Github
  • Enzyme – Home | Github

Others