Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the difference between aws-amplify-react and @aws-amplify/ui-react?

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 ?

like image 688
Lucas Andrade Avatar asked Jun 01 '20 22:06

Lucas Andrade


People also ask

What is AWS amplify UI?

Amplify UI is an open-source design system with cloud-connected components and primitives that simplify building accessible, responsive, and beautiful applications.

What is amplify UI components?

Amplify UI Components is an open-source UI toolkit that encapsulates cloud-connected workflows inside of cross-framework UI components.

What is React amplify?

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.

Is ReactJs same as react native?

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.


1 Answers

It looks like aws-amplify-react is the legacy package name and it was changed to @aws-amplify/ui-react in the current version.

amplify legacy react ui lib documentation page

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's Authenticator 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.

like image 75
Emile Bergeron Avatar answered Oct 16 '22 18:10

Emile Bergeron