-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
New issue
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
🧐[问题 | question] 在app.tsx中如何主动触发 children主动重新渲染或者刷新,想让当前children里面的组件重新请求一次数据 #11071
Comments
听说改变initailstate的值会自动重新渲染layout,你可以试试 |
在app.tsx中,要想主动触发子组件重新渲染或刷新,可以通过以下几种方式实现:
根据你提供的示例代码,如果你想让子组件重新请求数据,可以使用上述方法中的任意一种,在父组件中触发相应的操作来重新渲染子组件。 |
🧐 问题描述 | Problem description
在app.tsx中如何主动触发 children主动重新渲染或者刷新
💻 示例代码 | Sample code
childrenRender: (children) => { // if (initialState?.loading) return <PageLoading />; return ( <> {children} </> ); },
🚑 其他信息 | Other information
OS:
Node:
浏览器 | browser:
The text was updated successfully, but these errors were encountered: