📜  使用效果反应 - Javascript代码示例

📅  最后修改于: 2022-03-11 15:02:16.462000             🧑  作者: Mango

代码示例5
import React, { useState, useEffect } from 'react';
function Example() {
  const [count, setCount] = useState(0);

  useEffect(() => {    document.title = `You clicked ${count} times`;  });
  return (
    

You clicked {count} times

); }