Difference between revisions of "React"

From Wiki
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

Experimentations


Tuto par l'exemple

Exemples pour démarrer :


Exemples divers :


Routing :


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