This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React, {Component} from 'react'; | |
| import './App.css'; | |
| import ListeProducts from "./ListeProducts"; | |
| import Form from "./Form"; | |
| class App extends Component { | |
| state = { | |
| products: [], | |
| Title:"", | |
| description:"", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import {BrowserRouter,Route,Switch} from "react-router-dom"; | |
| const Root = () =>( | |
| <BrowserRouter> | |
| <div> | |
| <Switch> | |
| <Route exact path ='/' component={}/> | |
| <Route exact path ='/pokemon' component={pokemon}/> | |
| <Route component={NoteFound}/> | |
| </Switch> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| RewriteBase / | |
| RewriteRule ^index\.html$ - [L] | |
| RewriteCond %{REQUEST_FILENAME} !-f | |
| RewriteCond %{REQUEST_FILENAME} !-d | |
| RewriteRule . /index.html [L] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React, {Component} from 'react'; | |
| import NavLink from "react-router-dom/es/NavLink"; | |
| import Info from "./Info"; | |
| class Display2 extends Component { | |
| state = { | |
| personne:[], | |
| }; | |
| object = (people) => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // App.js | |
| import React, { Component } from "react"; | |
| import "./App.css"; | |
| class App extends Component { | |
| state = { | |
| scores:["jean","pierre","stephane","charlotte"] | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function lettreCapitalize(str) { | |
| const arr = str.split(" "); | |
| const arrCapitalize = arr.map(str => str.charAt(0).toUpperCase() + str.slice(1)); | |
| return arrCapitalize.join(" ") | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| retrieveData = async () => { | |
| // config url | |
| const url =""; | |
| const data = await axios.get(`${url}`); | |
| console.log(data); | |
| }; | |
| componentDidMount() { | |
| this.retrieveData(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React, { Component } from 'react'; | |
| import './App.css'; | |
| class App extends Component { | |
| state = { | |
| nom:"", | |
| email:"" | |
| }; | |
| handleSubmit = () => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React, { Component } from 'react' | |
| const arr = [12,23,56] | |
| class DisplayPokemon extends Component { | |
| state = { | |
| data:[] | |
| } | |
| //!Lance la function au demarrage | |
| componentDidMount() { | |
| this.fetchData() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const getCount = (str) => { | |
| let consonne = 0 | |
| let vowelsCount = 0; | |
| const letter = str.split('') | |
| let voyelles = ["a", "o", "i", "e", "u"]; | |
| letter.map((letter) => { | |
| voyelles.includes(letter) ? vowelsCount += 1 : consonne+=1 | |
| }) | |
| return `${vowelsCount} voyelles et ${consonne} consone`; | |
| } |