From the course: Build a React Application Using AWS Amplify

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

React and Cognito are good companions

React and Cognito are good companions - Amazon Web Services (AWS) Tutorial

From the course: Build a React Application Using AWS Amplify

Start my 1-month free trial

React and Cognito are good companions

= [Instructor]It's time to add integration with the auth module using Cognito that we've just added, into our react code. Go ahead and close out your development server, if you've still got it running. And then hop into your IDE. Pull open app.JS, which I have showing here. And you'll notice a number of different imports. We want to add an additional import to that, and that's going to be two different functions, with authenticator, and then amplify sign out. We're not going to use amplify sign out yet but we're going to need it down the line. So it's worth going ahead and pulling in. And we want to grab both of these from AWS amplify/UI react. And that should be familiar because you pulled that code down using NPM quite a while ago. It's finally going to be available and useful. Now go to the end of the file and notice the export default app, that just pushes out this component. We want to wrap that in with…

Contents