useRef hook can be used to store any mutable value ,因此您可以存储一个bool 值,指示是否是第一次运行效果。 示例 const { useState, useRef, useEffect } ...
確定! 回上一頁