React 會在component mount 的時候將DOM element 賦值到 current 屬性,並在unmount 時將它清空回 null 。 ref 的更新發生在生命週期 componentDidMount 或 ...
確定! 回上一頁