We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
参考资料
问题产生
在antd中想要在上层函数式组件获取到下级组件中的一些方法
function Parent() { const childRef = useRef(null) return ( <div> <Child ref=childRef /> </div> ) } // ------------------- function Child(props, ref) { const [form] = Form.useForm() // antd的form实例 ref.current = form // 这时候父组件就能通过childRef去调用子组件的form方法了 return ( .... ) } export default React.forwardRef(Child)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
参考资料
问题产生
The text was updated successfully, but these errors were encountered: