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
之前对 [email protected] 的配置不太了解,一直没能支持 3.x
感谢 @AlanSean 同学在 CJY0208/react-activation#8 (comment) 中的提醒
使用 rootContainer 测试后是可以实现 AliveScope 注入需求的
rootContainer
AliveScope
那么这几天大概可以支持上了,以下是测通了的 demo
// src/app.tsx import React from 'react'; import { Router } from 'umi'; import { renderRoutes } from '@umijs/renderer-react'; import { AliveScope } from 'react-activation'; function AliveScopeContainer({ children, history, ...renderRoutesProps }: any) { const useRouterComponent = children.type; useRouterComponent({ history, ...renderRoutesProps }); return ( <Router history={history}> <AliveScope>{renderRoutes(renderRoutesProps)}</AliveScope> </Router> ); } export function rootContainer(container: any, clientProps: any) { return ( <AliveScopeContainer {...clientProps}>{container}</AliveScopeContainer> ); }
@MinJieLiu @wangyinwei1 @lebron112
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
之前对 [email protected] 的配置不太了解,一直没能支持 3.x
感谢 @AlanSean 同学在 CJY0208/react-activation#8 (comment) 中的提醒
使用
rootContainer
测试后是可以实现AliveScope
注入需求的那么这几天大概可以支持上了,以下是测通了的 demo
@MinJieLiu @wangyinwei1 @lebron112
The text was updated successfully, but these errors were encountered: