我在日语论坛上问了同样的问题,但没有得到答复,所以我在这个网站上提问。
这个问题是关于 AWS Amplify。
我正在尝试使用 Amplify 的 React 和 withAuthenticator() 实现登录表单,引用 AWS( https://aws-amplify.github.io/docs/js/authentication ) 的文档,
但是我的登录表单不像文档的示例 UI,并且 css 没有像下图这样应用。
我可以登录和注册。
有什么办法可以解决这个问题吗?
my login form made by withAuthenticator()
import Amplify from 'aws-amplify';
import awsconfig from './aws-exports';
import { withAuthenticator } from 'aws-amplify-react';
Amplify.configure(awsconfig);
function App() {
return (
);
}
export default withAuthenticator(App);
我清除了缓存但没有工作。
Chrome 的开发工具也没有错误。
对不起,我的英语不好。
最佳答案
尝试使用 @aws-amplify/ui-react
而不是 aws-amplify-react
.
import { withAuthenticator } from '@aws-amplify/ui-react';
关于reactjs - 使用 Amplify 实现的登录表单未应用样式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61159622/