gpt4 book ai didi

javascript - aws-amplify-react 和 @aws-amplify/ui-react 有什么区别?

转载 作者:行者123 更新时间:2023-12-01 15:55:31 31 4
gpt4 key购买 nike

我看到很多文档和地方说要使用 aws-amplify-react但是在文档中开始使用 react 我看到了这个包 @aws-amplify/ui-react使用模块withAuthentication (aws-amplify-react 也有)

他们之间有什么区别?我什么时候应该使用 aws-amplify-react什么时候应该使用@aws-amplify/ui-react ?

最佳答案

看起来像 aws-amplify-react is the legacy package名称并更改为 @aws-amplify/ui-react in the current version .

amplify legacy react ui lib documentation page

所以要回答使用哪个,请使用 @aws-amplify/ui-reactmigration section of the documentation. 中所述文档可能不是所有地方都是最新的。

他们有一个 migration section在存储库中 README.md文件:

For aws-amplify-react's Authenticator Component, you will need to import the styles within your app:

import '@aws-amplify/ui/dist/style.css';


但即使该文件也不是完全最新的,因为它仍然引用安装部分中的旧版本。

看起来文档更新正在进行中,但您可以在 documentation repository 上寻求更多指导。 .

关于javascript - aws-amplify-react 和 @aws-amplify/ui-react 有什么区别?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62142118/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com