Skip to content
Snippets Groups Projects
Commit 2c554ffe authored by Jean-Christophe Routier's avatar Jean-Christophe Routier
Browse files

Merge branch 'main' of gitlab-ssh.univ-lille.fr:javascript/intro-react

parents ab428c68 c437d698
No related branches found
No related tags found
No related merge requests found
import { useState, useEffect } from 'react'; import { useState, useEffect } from 'react';
import '../assets/style/app.css'; import '../assets/style/app.css';
......
import { useState, useEffect, useRef } from 'react'; import { useEffect, useRef } from 'react';
import '../assets/style/person.css'; import '../assets/style/person.css';
......
...@@ -8,13 +8,13 @@ import PersonListingControls from './personListingControls.component.jsx'; ...@@ -8,13 +8,13 @@ import PersonListingControls from './personListingControls.component.jsx';
const INITIAL_DELAY= 1000; const INITIAL_DELAY= 1000;
const PersonListingController = ( props ) => { const PersonListingController = ( props ) => {
const { persons, incrementAge } = props;
const [ closed, setClosed ] = useState(false); const [ closed, setClosed ] = useState(false);
const [ started, setStarted ] = useState(false); const [ started, setStarted ] = useState(false);
const [ delay, setDelay ] = useState(INITIAL_DELAY); const [ delay, setDelay ] = useState(INITIAL_DELAY);
const startStop = () => setStarted( previousStarted => ! previousStarted); const startStop = () => setStarted( previousStarted => ! previousStarted);
const closeComponent = () => { const closeComponent = () => {
setClosed(previousClosed => ! previousClosed); setClosed(previousClosed => ! previousClosed);
setStarted(false); setStarted(false);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment