Difference between revisions of "React"
Jump to navigation
Jump to search
| Line 28: | Line 28: | ||
** https://reactrouter.com/web/guides/quick-start | ** https://reactrouter.com/web/guides/quick-start | ||
** https://learnwithparam.com/blog/basic-routing-in-react-router/ | ** https://learnwithparam.com/blog/basic-routing-in-react-router/ | ||
| + | |||
| + | |||
| + | ==Créer une nouvelle application à partir d'un dossier Src== | ||
| + | * Étape 1 : Créer une nouvelle application | ||
| + | <pre> | ||
| + | npx create-react-app mon-app | ||
| + | cd mon-app | ||
| + | npm start | ||
| + | </pre> | ||
| + | |||
| + | * Étape 2 : Remplacer le dossier src | ||
| + | |||
| + | * Étape 3 : Installer les modules au besoin | ||
| + | <pre> | ||
| + | npm install react-router-dom | ||
| + | npm install node-sass | ||
| + | npm install react-bootstrap bootstrap | ||
| + | </pre> | ||
| + | |||
| + | * Lancer l'application | ||
| + | <pre> | ||
| + | npm start | ||
| + | </pre> | ||
Revision as of 14:34, 23 July 2020
Documentation
- https://fr.reactjs.org/
- Semantic React : https://react.semantic-ui.com/
- Créer une app React : https://fr.reactjs.org/docs/create-a-new-react-app.html
- Installer Bootstrap avec React : https://react-bootstrap.github.io/getting-started/introduction
Experimentations
Tuto par l'exemple
Exemples pour démarrer :
- Ajouter React en une minute : https://fr.reactjs.org/docs/add-react-to-a-website.html
- Hello Word : https://fr.reactjs.org/docs/hello-world.html
- Exemple React.Component : https://fr.reactjs.org/docs/components-and-props.html
- AJAX et les API : https://fr.reactjs.org/docs/faq-ajax.html
Exemples divers :
Routing :
- Basic routing in React using React Router :
Créer une nouvelle application à partir d'un dossier Src
- Étape 1 : Créer une nouvelle application
npx create-react-app mon-app cd mon-app npm start
- Étape 2 : Remplacer le dossier src
- Étape 3 : Installer les modules au besoin
npm install react-router-dom npm install node-sass npm install react-bootstrap bootstrap
- Lancer l'application
npm start