This file contains 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
<div class="container"> | |
<div class="red">rouge</div> | |
<div class="green">vert</div> | |
<div class="yellow">jaune</div> | |
<div class="black">noir</div> | |
<div class="orange">orange</div> | |
<div class="white">blanc</div> | |
</div> |
This file contains 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
.container{ | |
display: grid; | |
grid-template-columns: repeat(3, 1fr); | |
} |
This file contains 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
.container{ | |
display: grid; | |
grid-template-columns: 100px 100px; | |
} |
This file contains 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
.green { | |
background-color: green; | |
grid-column-start: 1; | |
} |
This file contains 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
.green { | |
background-color: green; | |
grid-column: 1; | |
grid-row: 1; | |
} |
This file contains 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
useEffect(() => { | |
const timer = window.setInterval(() => { | |
setState(n => n + 1), 1000) | |
return function () { | |
clearInterval(timer) | |
} | |
}, []) |
This file contains 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 { createContext } from 'react' | |
export const YourContext = createContext(); | |
export const YourProvider = ({children}) => { | |
// traitement de vos data | |
return ( | |
<YourProvider.Provider value = {{value}}> | |
{children} | |
</YourProvider.Provider> | |
)} |
This file contains 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
<YourProvider> | |
<Header /> | |
<Home /> | |
<Footer /> | |
</YourProvider> |
This file contains 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
Export fonction useMyHook(param) { | |
// traitement | |
} |
This file contains 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
class Exemple extends React.Component { | |
render() { | |
return <h1>Hello World</h1>; | |
} | |
} |
OlderNewer