30.
Which Hook could be used to update the document's title?
useEffect(() => { title = name + ' ' + lastname; });
useContext(function updateTitle() { title = name + ' ' + lastname; });
useEffect(function updateTitle() { document.title = name + ' ' + lastname; });
useState(function updateTitle() { name + ' ' + lastname; });
Correct: C
The useEffect Hook in React can be used to perform side effects in functional components. By passing an empty dependency array, useEffect will only run once when the component mounts and can be used to update the document's title using the document.title property.