EffectuseUnmount本页总览useUnmount 组件卸载的时候执行 Usage 实时编辑器 function Demo() { const [value] = useState("mounted"); useUnmount(() => { alert("UnMounted"); }); return <div>{value}</div>; }; 结果Loading... API useUnmount Returns void Arguments 参数名描述类型默认值fn清理函数() => void (必填)-