我为我的放大反应应用程序创建了一个自定义SignIn页面。AuthPage这渲染和工作正常,除非我登录后显示旧的注册页面,直到我刷新应用程序。
我已经查看了SignIn组件和AuthPiece组件,但我似乎无法找出onStateChange可能发生这种情况的地方?
index.js
function renderApp(app) {
render(
<Authenticator hide={[SignIn, Greetings]} amplifyConfig={awsmobile} hideDefault>
<AuthPage {...app.props} />
<AppContainer {...app.props}>
{app}
</AppContainer>
</Authenticator>,
document.getElementById('root')
);
}
renderApp(<Root store={store} routeConfig={routeConfig} />);