Skip to content

Instantly share code, notes, and snippets.

View GuillaumeDaviid's full-sized avatar

Guillaume DAVID GuillaumeDaviid

View GitHub Profile
function Exemple(props) {
return <h1>Hello World</h1>;
}
function Example() {
const [count, setCount] = useState(0);
return (
<div>
<p>count: {count}</p>
<button onClick={() => setCount(count + 1)}>Click</button>
</div>
);
};
class Example extends React.Component {
constructor(props) {
super(props);
this.state = {
count: 0
};
}
render() {
return (
<div>
class Exemple extends React.Component {
componentDidMount() {
console.log("Hello World");
}
render() {
return <h1>Hello World</h1>;
}}
function Exemple () {
useEffect(() => {
console.log("Hello World");
}, []);
return <h1>Hello World</h1>;
};
<script src="https://unpkg.com/scrollreveal"></script>
<p class='para__exemple'>
texte d'exemple ...
</p>
ScrollReveal().reveal('.para__exemple');
ScrollReveal().reveal('.para__exemple', { origin: "bottom", distance: '100px' });
<p>HELLO WORLD</p>