aws-amplify / aws-amplify/docs
[Feedback]CLI > Authentication > Admin Actions: react example outdated
- Dominant language
- MDX
- Stars
- 506
- Forks
- 1.1k
- Avg merge
- 3h 14m
- Merged PRs (30d)
- 1
Description
**Page**: [`/cli/auth/admin`](https://docs.amplify.aws/cli/auth/admin)
**Feedback**:
The current JS(React) example for the Admin actions section of the CLI uses some outdated information.
1. `import React from 'react'` is [no longer necessary ](https://reactjs.org/blog/2020/09/22/introducing-the-new-jsx-transform.html#removing-unused-react-imports)
2. `import { withAuthenticator } from 'aws-amplify-react'` is using a [deprecated package](https://www.npmjs.com/package/aws-amplify-react), this package was [deprecated in v5](https://github.com/aws-amplify/amplify-js/releases/tag/aws-amplify%405.0.0) of the Amplify JS library. It should now show the import to come from the UI package, `@aws-amplify/ui-react`
3. the last line shows `withAuthenticator` passing 2 arguments, but the 2nd is [not required in the new UI package](https://ui.docs.amplify.aws/react/connected-components/authenticator#step-3-add-the-authenticator)
4. maybe we should add the styles import if we are going to add in the Authenticator component? `import '@aws-amplify/ui-react/styles.css';`
Contributor guide
Assessment
This issue has not been assessed yet.