1.回调函数模式,动态设置refs
2.React will call the ref
callback with the DOM element when the component mounts, and call it with null
when it unmounts. ref
callbacks are invoked before componentDidMount
or componentDidUpdate
lifecycle hooks.
1.回调函数模式,动态设置refs
2.React will call the ref
callback with the DOM element when the component mounts, and call it with null
when it unmounts. ref
callbacks are invoked before componentDidMount
or componentDidUpdate
lifecycle hooks.