I saw many docs and places saying to use aws-amplify-react
but here on the docs to get start with react I saw this package @aws-amplify/ui-react to use the module withAuthentication
(which aws-amplify-react
also has)
What's the difference between them? When should I use aws-amplify-react
and when should I use @aws-amplify/ui-react
?
Amplify UI is an open-source design system with cloud-connected components and primitives that simplify building accessible, responsive, and beautiful applications.
Amplify UI Components is an open-source UI toolkit that encapsulates cloud-connected workflows inside of cross-framework UI components.
The Amplify Hosting is an AWS service that provides a git-based workflow for continuous deployment & hosting of fullstack web apps. Cloud resources created by the Amplify CLI are also visible in the Amplify Console.
Introduction: React vs React Native? React and React Native are developed by Facebook and have gained a huge fan base in a short time. React is known as ReactJs, which is a JavaScript library to build single-page web applications. Besides, React Native is a React JS-based framework to design mobile apps.
It looks like aws-amplify-react
is the legacy package name and it was changed to @aws-amplify/ui-react
in the current version.
So to answer which to use, use @aws-amplify/ui-react
as mentioned in the migration section of the documentation. The documentation is possibly not up to date everywhere.
They have a migration section in the repository README.md
file as well:
For
aws-amplify-react
'sAuthenticator
Component, you will need to import the styles within your app:import '@aws-amplify/ui/dist/style.css';
But even that file isn't completely up to date since it still refers to the legacy version in the installation section.
It looks like the documentation update is currently in progress, though you could ask for more guidance on the documentation repository.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With