antoniosarosi / home-cloud

The "cloud" at home
390 stars 103 forks source link

Refactor React components to hooks #16

Open antoniosarosi opened 4 years ago

antoniosarosi commented 4 years ago

Refactor class based components to look like this one:

const FormModal = (props) => {
  const [show, setShow] = useState(false);

  const handleClose = () => setShow(false);
  const handleShow = () => setShow(true);
  // ...
}