Give names to the components

Report a typo

Categorize these components according to whether the hooks within them are used correctly. If they follow the rules of hooks, label them useHookExample; if they don't, label them dontUseHookExample.

Fill in the gaps with the relevant elements
function () {
  useEffect(() => {
    const [value, setValue] = useState('');
    // ...
  });
  // ...
}
class  extends React.Component {
  useEffect(() => {
    const [value, setValue] = useState('');
    // ...
  });
  // ...
}
function () {
  const [value, setValue] = useState(0);
  useEffect(() => {
    // ...
  }, [value]);
  // ...
}

Create a free account to access the full topic