Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Building Serverless React Applications with AWS Amplify

NotificationsYou must be signed in to change notification settings

dabit3/aws-amplify-workshop-react

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

98 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

In this workshop we'll learn how to build cloud-enabled web applications with GraphQL, React, &AWS Amplify.

Topics we'll be covering:

Getting Started - Creating the React Application

To get started, we first need to create a new React project & change into the new directory using theCreate React App CLI.

If you already have this installed, skip to the next step. If not, either install the CLI & create the app or create a new app using npx:

npm install -g create-react-appcreate-react-app my-amplify-app

Or use npx (npm 5.2 & later) to create a new app:

npx create-react-app my-amplify-app

Now change into the new app directory & install the AWS Amplify & AWS Amplify React libraries:

cd my-amplify-appnpm install --save aws-amplify aws-amplify-react uuid# oryarn add aws-amplify aws-amplify-react uuid

Installing the CLI & Initializing a new AWS Amplify Project

Installing the CLI

Next, we'll install the AWS Amplify CLI:

npm install -g @aws-amplify/cli

Now we need to configure the CLI with our credentials:

amplifyconfigure

If you'd like to see a video walkthrough of this configuration process, clickhere.

Here we'll walk through theamplify configure setup. Once you've signed in to the AWS console, continue:

  • Specify the AWS Region:eu-central-1
  • Specify the username of the new IAM user:amplify-workshop-user

In the AWS Console, clickNext: Permissions,Next: Tags,Next: Review, &Create User to create the new IAM user. Then, return to the command line & press Enter.

  • Enter the access key of the newly created user:
    accessKeyId:(<YOUR_ACCESS_KEY_ID>)
    secretAccessKey:(<YOUR_SECRET_ACCESS_KEY>)
  • Profile Name:amplify-workshop-user

Initializing A New Project

amplify init
  • Enter a name for the project:amplifyreactapp
  • Enter a name for the environment:dev
  • Choose your default editor:Visual Studio Code (or your default editor)
  • Please choose the type of app that you're buildingjavascript
  • What javascript framework are you usingreact
  • Source Directory Path:src
  • Distribution Directory Path:build
  • Build Command:npm run-script build
  • Start Command:npm run-script start
  • Do you want to use an AWS profile?Y
  • Please choose the profile you want to use:amplify-workshop-user

Now, the AWS Amplify CLI has iniatilized a new project & you will see a new folder:amplify & a new file calledaws-exports.js in thesrc directory. These files hold your project configuration.

Adding Authentication

To add authentication, we can use the following command:

amplify add auth
  • Do you want to use default authentication and security configuration?Default configuration
  • How do you want users to be able to sign in when using your Cognito User Pool?Username
  • What attributes are required for signing up?Email (keep default)

Now, we'll run the push command and the cloud resources will be created in our AWS account.

amplify push

To view the service you can run theconsole command the feature you'd like to view:

amplify console auth

Configuring the React applicaion

Now, our resources are created & we can start using them!

The first thing we need to do is to configure our React application to be aware of our new AWS Amplify project. We can do this by referencing the auto-generatedaws-exports.js file that is now in our src folder.

To configure the app, opensrc/index.js and add the following code below the last import:

importAmplifyfrom'aws-amplify'importconfigfrom'./aws-exports'Amplify.configure(config)

Now, our app is ready to start using our AWS services.

Using the withAuthenticator component

To add authentication, we'll go intosrc/App.js and first import thewithAuthenticator HOC (Higher Order Component) fromaws-amplify-react:

src/App.js

import{withAuthenticator}from'aws-amplify-react'

Next, we'll wrap our default export (the App component) with thewithAuthenticator HOC:

exportdefaultwithAuthenticator(App,{includeGreetings:true})
# run the appnpm start

Now, we can run the app and see that an Authentication flow has been added in front of our App component. This flow gives users the ability to sign up & sign in.

To view the new user that was created in Cognito, go back to the dashboard athttps://console.aws.amazon.com/cognito/. Also be sure that your region is set correctly.

Accessing User Data

We can access the user's info now that they are signed in by callingAuth.currentAuthenticatedUser().

src/App.js

importReact,{useEffect}from'react'import{Auth}from'aws-amplify'functionApp(){useEffect(()=>{Auth.currentAuthenticatedUser().then(user=>console.log({ user})).catch(error=>console.log({ error}))})return(<divclassName="App"><p>        Edit<code>src/App.js</code> and save to reload.</p></div>)}exportdefaultApp

Custom authentication strategies

ThewithAuthenticator component is a really easy way to get up and running with authentication, but in a real-world application we probably want more control over how our form looks & functions.

Let's look at how we might create our own authentication flow.

To get started, we would probably want to create input fields that would hold user input data in the state. For instance when signing up a new user, we would probably need 4 user inputs to capture the user's username, email, password, & phone number.

To do this, we could create some initial state for these values & create an event handler that we could attach to the form inputs:

// initial stateimportReact,{useReducer}from'react'// define initial stateconstinitialState={username:'',password:'',email:''}// create reducerfunctionreducer(state,action){switch(action.type){case'SET_INPUT':return{ ...state,[action.inputName]:action.inputValue}default:returnstate}}// useReducer hook creates local stateconst[state,dispatch]=useReducer(reducer,initialState)// event handlerfunctiononChange(e){dispatch({type:'SET_INPUT',inputName:e.target.name,inputValue:e.target.value})}// example of usage with input<inputname='username'placeholder='username'value={state.username}onChange={onChange}/>

We'd also need to have a method that signed up & signed in users. We can use the Auth class to do this. The Auth class has over 30 methods including things likesignUp,signIn,confirmSignUp,confirmSignIn, &forgotPassword. These functions return a promise so they need to be handled asynchronously.

// import the Auth componentimport{Auth}from'aws-amplify'// Class method to sign up a userasyncfunctionsignUp(){const{ username, password, email}=statetry{awaitAuth.signUp({ username, password,attributes:{ email}})console.log('user successfully signed up!')}catch(err){console.log('error signing up user...',err)}}<buttononClick={signUp}>Sign Up</button>

Adding a GraphQL API

To add a GraphQL API, we can use the following command:

amplify add api

Answer the following questions

  • Please select from one of the above mentioned servicesGraphQL
  • Provide API name:CryptoGraphQL
  • Choose an authorization type for the APIAPI key
  • Do you have an annotated GraphQL schema?N
  • Do you want a guided schema creation?Y
  • What best describes your project:Single object with fields (e.g. “Todo” with ID, name, description)
  • Do you want to edit the schema now? (Y/n)Y

When prompted, update the schema to the following:

typeCoin@model {id:ID!clientId:IDname:String!symbol:String!price:Float!}

Next, let's push the configuration to our account:

amplify push
  • Do you want to generate code for your newly created GraphQL APIY
  • Choose the code generation language target:javascript
  • Enter the file name pattern of graphql queries, mutations and subscriptions:(src/graphql/**/*.js)
  • Do you want to generate/update all possible GraphQL operations - queries, mutations and subscriptions?Y
  • Enter maximum statement depth [increase from default if your schema is deeply nested]2

To view the service you can run theconsole command the feature you'd like to view:

amplify console api

Adding mutations from within the AWS AppSync Console

In the AWS AppSync console, open your API & then click on Queries.

Execute the following mutation to create a new coin in the API:

mutationcreateCoin {createCoin(input: {name:"Bitcoin"symbol:"BTC"price:9000  }) {idnamesymbolprice  }}

Now, let's query for the coin:

querylistCoins {listCoins {items {idnamesymbolprice    }  }}

We can even add search / filter capabilities when querying:

querylistCoins {listCoins(filter: {price: {gt:2000    }  }) {items {idnamesymbolprice    }  }}

Interacting with the GraphQL API from our client application - Querying for data

Now that the GraphQL API is created we can begin interacting with it!

The first thing we'll do is perform a query to fetch data from our API.

To do so, we need to define the query, execute the query, store the data in our state, then list the items in our UI.

src/App.js

// src/App.jsimportReact,{useEffect,useState}from'react'// imports from Amplify libraryimport{API,graphqlOperation}from'aws-amplify'import{withAuthenticator}from'aws-amplify-react'// import queryimport{listCoins}from'./graphql/queries'functionApp(){const[coins,updateCoins]=useState([])useEffect(()=>{getData()},[])asyncfunctiongetData(){try{constcoinData=awaitAPI.graphql(graphqlOperation(listCoins))console.log('data from API: ',coinData)updateCoins(coinData.data.listCoins.items)}catch(err){console.log('error fetching data..',err)}}return(<div>{coins.map((c,i)=>(<divkey={i}><h2>{c.name}</h2><h4>{c.symbol}</h4><p>{c.price}</p></div>))}</div>)}exportdefaultwithAuthenticator(App,{includeGreetings:true})

Performing mutations

Now, let's look at how we can create mutations. Let's change the component to use auseReducer hook.

// src/App.jsimportReact,{useEffect,useReducer}from'react'import{API,graphqlOperation}from'aws-amplify'import{withAuthenticator}from'aws-amplify-react'import{listCoins}from'./graphql/queries'import{createCoinasCreateCoin}from'./graphql/mutations'// import uuid to create a unique client IDimportuuidfrom'uuid/v4'constCLIENT_ID=uuid()// create initial stateconstinitialState={name:'',price:'',symbol:'',coins:[]}// create reducer to update statefunctionreducer(state,action){switch(action.type){case'SETCOINS':return{ ...state,coins:action.coins}case'SETINPUT':return{ ...state,[action.key]:action.value}default:returnstate}}functionApp(){const[state,dispatch]=useReducer(reducer,initialState)useEffect(()=>{getData()},[])asyncfunctiongetData(){try{constcoinData=awaitAPI.graphql(graphqlOperation(listCoins))console.log('data from API: ',coinData)dispatch({type:'SETCOINS',coins:coinData.data.listCoins.items})}catch(err){console.log('error fetching data..',err)}}asyncfunctioncreateCoin(){const{ name, price, symbol}=stateif(name===''||price===''||symbol==='')returnconstcoin={      name,price:parseFloat(price), symbol,clientId:CLIENT_ID}constcoins=[...state.coins,coin]dispatch({type:'SETCOINS', coins})console.log('coin:',coin)try{awaitAPI.graphql(graphqlOperation(CreateCoin,{input:coin}))console.log('item created!')}catch(err){console.log('error creating coin...',err)}}// change state then user types into inputfunctiononChange(e){dispatch({type:'SETINPUT',key:e.target.name,value:e.target.value})}// add UI with event handlers to manage user inputreturn(<div><inputname='name'placeholder='name'onChange={onChange}value={state.name}/><inputname='price'placeholder='price'onChange={onChange}value={state.price}/><inputname='symbol'placeholder='symbol'onChange={onChange}value={state.symbol}/><buttononClick={createCoin}>Create Coin</button>{state.coins.map((c,i)=>(<divkey={i}><h2>{c.name}</h2><h4>{c.symbol}</h4><p>{c.price}</p></div>))}</div>)}exportdefaultwithAuthenticator(App,{includeGreetings:true})

GraphQL Subscriptions

Next, let's see how we can create a subscription to subscribe to changes of data in our API.

To do so, we need to define the subscription, listen for the subscription, & update the state whenever a new piece of data comes in through the subscription.

// import the subscriptionimport{onCreateCoin}from'./graphql/subscriptions'// update reducerfunctionreducer(state,action){switch(action.type){case'SETCOINS':return{ ...state,coins:action.coins}case'SETINPUT':return{ ...state,[action.key]:action.value}// new 👇case'ADDCOIN':return{ ...state,coins:[...state.coins,action.coin]}default:returnstate}}// subscribe in useEffectuseEffect(()=>{constsubscription=API.graphql(graphqlOperation(onCreateCoin)).subscribe({next:(eventData)=>{constcoin=eventData.value.data.onCreateCoinif(coin.clientId===CLIENT_ID)returndispatch({type:'ADDCOIN', coin})}})return()=>subscription.unsubscribe()},[])

Adding Authorization to the GraphQL API

To add authorization to the API, we can re-configure the API to use our cognito identity pool. To do so, we can runamplify configure api:

amplify configure api
  • Please select from one of the below mentioned services:GraphQL
  • Choose an authorization type for the API:Amazon Cognito User Pool

Next, we'll runamplify push:

amplify push
  • Do you want to update code for your updated GraphQL APIN

Now, we can only access the API with a logged in user.

Adding fine-grained access controls to the GraphQL API

Next, let's add a field that can only be accessed by the current user.

To do so, we'll update the schema to add the following new type below the existing Coin type:

typeNote@model@auth(rules: [{allow: owner}]) {id:ID!title:String!description:String}

Next, we'll deploy the updates to our API:

amplify push
  • Do you want to update code for your updated GraphQL API:Y
  • Do you want to generate GraphQL statements (queries, mutations and subscription) based on your schema types?Y

Now, the operations associated with this field will only be accessible by the creator of the item.

To test it out, try creating a new user & accessing a note from another user.

To test the API out in the AWS AppSync console, it will ask for you toLogin with User Pools. The form will ask you for aClientId. ThisClientId is located insrc/aws-exports.js in theaws_user_pools_web_client_id field.

Adding a Serverless Function

Adding a basic Lambda Function

To add a serverless function, we can run the following command:

amplify add function

Answer the following questions

  • Provide a friendly name for your resource to be used as a label for this category in the project:basiclambda
  • Provide the AWS Lambda function name:basiclambda
  • Choose the function template that you want to use:Hello world function
  • Do you want to access other resources created in this project from your Lambda function?No
  • Do you want to edit the local lambda function now?Y

This should open the function package located atamplify/backend/function/basiclambda/src/index.js.

Edit the function to look like this, & then save the file.

exports.handler=function(event,context){console.log('event: ',event)constbody={message:"Hello world!"}constresponse={statusCode:200,    body}context.done(null,response);}

Next, we can test this out by running:

amplifyfunctioninvoke basiclambda

Using service: Lambda, provided by: awscloudformation

  • Provide the name of the script file that contains your handler function:index.js
  • Provide the name of the handler function to invoke:handler

You'll notice the following output from your terminal:

Running"lambda_invoke:default" (lambda_invoke) taskevent:  { key1:'value1', key2:'value2', key3:'value3' }Success!  Message:------------------{"statusCode":200,"body":{"message":"Hello world!"}}Done.Done running invoke function.

Where is the event data coming from? It is coming from the values located in event.json in the function folder (amplify/backend/function/basiclambda/src/event.json). If you update the values here, you can simulate data coming arguments the event.

Feel free to test out the function by updatingevent.json with data of your own.

Adding a function running an express server

Next, we'll build a function that will be running anExpress server inside of it.

This new function will fetch data from a cryptocurrency API & return the values in the response.

To get started, we'll create a new function:

amplify add function

Answer the following questions

  • Provide a friendly name for your resource to be used as a label for this category in the project:cryptofunction
  • Provide the AWS Lambda function name:cryptofunction
  • Choose the function template that you want to use:Serverless express function (Integration with Amazon API Gateway)
  • Do you want to access other resources created in this project from your Lambda function?No
  • Do you want to edit the local lambda function now?Y

This should open the function package located atamplify/backend/function/cryptofunction/src/index.js.

Here, we'll add the following code & save the file:

app.use(function(req,res,next){res.header("Access-Control-Allow-Origin","*")res.header("Access-Control-Allow-Headers","Origin, X-Requested-With, Content-Type, Accept")next()});// below the last app.use() method, add the following code 👇constaxios=require('axios')app.get('/coins',function(req,res){letapiUrl=`https://api.coinlore.com/api/tickers?start=0&limit=10`console.log(req.query);if(req&&req.query){const{ start=0, limit=10}=req.queryapiUrl=`https://api.coinlore.com/api/tickers/?start=${start}&limit=${limit}`}axios.get(apiUrl).then(response=>{res.json({coins:response.data.data})}).catch(err=>res.json({error:err}))})

Next, we'll install axios in the function package:

cd amplify/backend/function/cryptofunction/srcnpm install axios

Next, change back into the root directory.

Now we can test this function out:

amplifyfunctionbuildamplifyfunctioninvoke cryptofunction

This will start up the node server. We can then makecurl requests agains the endpoint:

curl'localhost:3000/coins?start=0&limit=1'

If we'd like to test out the query parameters, we can update theevent.json to add the following:

{"httpMethod":"GET","path":"/coins","query": {"start":"0","limit":"1"    }}

When we invoke the function these query parameters will be passed in & the http request will be made immediately.

Adding a REST API

Now that we've created the cryptocurrency Lambda function let's add an API endpoint so we can invoke it via http.

To add the REST API, we can use the following command:

amplify add api

Answer the following questions

  • Please select from one of the above mentioned servicesREST
  • Provide a friendly name for your resource that will be used to label this category in the project:cryptoapi
  • Provide a path (e.g., /items)/coins
  • Choose lambda sourceUse a Lambda function already added in the current Amplify project
  • Choose the Lambda function to invoke by this path:cryptofunction
  • Restrict API accessY
  • Who should have access?Authenticated users only
  • What kind of access do you want for Authenticated usersread/create/update/delete
  • Do you want to add another path? (y/N)N

Now the resources have been created & configured & we can push them to our account:

amplify push

Interacting with the new API

Now that the API is created we can start sending requests to it & interacting with it.

Let's request some data from the API:

// src/App.jsimportReact,{useEffect,useState}from'react'import{API}from'aws-amplify'import{withAuthenticator}from'aws-amplify-react'functionApp(){const[coins,updateCoins]=useState([])asyncfunctiongetData(){try{// const data = await API.get('cryptoapi', '/coins')constdata=awaitAPI.get('cryptoapi','/coins?limit=5&start=100')console.log('data from Lambda REST API: ',data)updateCoins(data.coins)}catch(err){console.log('error fetching data..',err)}}useEffect(()=>{getData()},[])return(<div>{coins.map((c,i)=>(<divkey={i}><h2>{c.name}</h2><p>{c.price_usd}</p></div>))}</div>)}exportdefaultwithAuthenticator(App,{includeGreetings:true})

Challenge

Refactor the above component to useuseReducer instead ofuseState to add an additionalloading parameter to the initial state to indicate that the app is fetching and loading when launched.

Working with Storage

To add storage, we can use the following command:

amplify add storage

Answer the following questions

  • Please select from one of the below mentioned servicesContent (Images, audio, video, etc.)
  • Please provide a friendly name for your resource that will be used to label this category in theproject:YOURAPINAME
  • Please provide bucket name:YOURUNIQUEBUCKETNAME
  • Who should have access:Auth users only
  • What kind of access do you want for Authenticated userscreate/update, read, delete
amplify push

Now, storage is configured & ready to use.

What we've done above is created configured an Amazon S3 bucket that we can now start using for storing items.

For example, if we wanted to test it out we could store some text in a file like this:

import{Storage}from'aws-amplify'// create function to work with StoragefunctionaddToStorage(){awaitStorage.put('javascript/MyReactComponent.js',`    import React from 'react'    const App = () => (      <p>Hello World</p>    )    export default App  `)console.log('data stored in S3!')}// add click handler<buttononClick={addToStorage}>Add To Storage</button>

This would create a folder calledjavascript in our S3 bucket & store a file calledMyReactComponent.js there with the code we specified in the second argument ofStorage.put.

To view the new bucket that was created in S3, go to the dashboard athttps://console.aws.amazon.com/s3. Also be sure that your region is set correctly.

If we want to read everything from this folder, we can useStorage.list:

readFromStorage(){constdata=Storage.list('javascript/')console.log('data from S3: ',data)}

If we only want to read the single file, we can useStorage.get:

readFromStorage(){constdata=Storage.get('javascript/MyReactComponent.js')console.log('data from S3: ',data)}

If we wanted to pull down everything, we can useStorage.list:

functionreadFromStorage(){constdata=Storage.list('')console.log('data from S3: ',data)}

Working with images

Here's how you can store an image:

functionApp(){asyncfunctiononChange(e){constfile=e.target.files[0];awaitStorage.put('example.png',file)console.log('image successfully stored!')}return(<inputtype="file"accept='image'onChange={(e)=>this.onChange(e)}/>)}

Here's how you can read and display an image:

importReact,{useState}from'react'functionApp(){const[imageUrl,updateImage]=useState('')asyncfunctionfetchImage(){constimagePath=awaitStorage.get('example.png')updateImage(imagePath)}return(<div><imgsrc={imageUrl}/><buttononClick={fetchImage}>Fetch Image</button></div>)}

We can even use the S3Album component, one of a few components in the AWS Amplify React library to create a pre-configured photo picker:

import{S3Album,withAuthenticator}from'aws-amplify-react'functionApp(){return(<divclassName="App"><S3Albumpath={''}picker/></div>);}

Adding Analytics

To add analytics, we can use the following command:

amplify add analytics

Next, we'll be prompted for the following:

  • Provide your pinpoint resource name:amplifyanalytics
  • Apps need authorization to send analytics events. Do you want to allow guest/unauthenticated users to send analytics events (recommended when getting started)?Y
  • overwrite YOURFILEPATH-cloudformation-template.ymlY

Recording events

Now that the service has been created we can now begin recording events.

To record analytics events, we need to import theAnalytics class from Amplify & then callAnalytics.record:

import{Analytics}from'aws-amplify'state={username:''}asynccomponentDidMount(){try{constuser=awaitAuth.currentAuthenticatedUser()this.setState({username:user.username})}catch(err){console.log('error getting user: ',err)}}recordEvent=()=>{Analytics.record({name:'My test event',attributes:{username:this.state.username}})}<buttononClick={this.recordEvent}>RecordEvent</button>

Working with multiple environments

You can create multiple environments for your application in which to create & test out new features without affecting the main environment which you are working on.

When you create a new environment from an existing environment, you are given a copy of the entire backend application stack from the original project. When you make changes in the new environment, you are then able to test these new changes in the new environment & merge only the changes that have been made since the new environment was created back into the original environment.

Let's take a look at how to create a new environment. In this new environment, we'll re-configure the GraphQL Schema to have another field for the coin rank.

First, we'll initialize a new environment usingamplify env add:

amplify env add> Do you want to use an existing environment? No> Enter a namefor the environment: apiupdate> Do you want to use an AWS profile? Y> Please choose the profile you want to use: amplify-workshop-profile

Once the new environment is initialized, we should be able to see some information about our environment setup by running:

amplify env list| Environments|| ------------|| dev||*apiupdate|

Now we can update the GraphQL Schema inamplify/backend/api/CryptoGraphQL/schema.graphql to the following (adding therank field):

typeCoin {id:ID!clientId:IDname:String!symbol:String!price:Float!rank:Int}

Now, we can create this new stack by runningamplify push:

amplify push

After we test it out, we can now merge it into our original local environment:

amplify env checkoutlocal

Next, run thestatus command:

amplify status

You should now see anUpdate operation:

Current Environment:local| Category| Resource name| Operation| Provider plugin|| --------| ---------------| ---------| -----------------|| Api| CryptoGraphQL| Update| awscloudformation|| Auth| cognito75a8ccb4| No Change| awscloudformation|

To deploy the changes, run the push command:

amplify push
  • Do you want to update code for your updated GraphQL API?Y
  • Do you want to generate GraphQL statements?Y

Now, the changes have been deployed & we can delete the apiupdate environment:

amplify env remove apiupdateDo you also want to remove all the resources of the environment from the cloud? Y

Now, we should be able to run thelist command & see only our main environment:

amplify env list

Deploying via the Amplify Console

For hosting, we can use theAmplify Console to deploy the application.

The first thing we need to do iscreate a new GitHub repo for this project. Once we've created the repo, we'll copy the URL for the project to the clipboard & initialize git in our local project:

git initgit remote add origin git@github.com:username/project-name.gitgit add.git commit -m'initial commit'git push origin master

Next we'll visit the Amplify Console in our AWS account athttps://eu-west-1.console.aws.amazon.com/amplify/home.

Here, we'll clickGet Started to create a new deployment. Next, authorize Github as the repository service.

Next, we'll choose the new repository & branch for the project we just created & clickNext.

In the next screen, we'll create a new role & use this role to allow the Amplify Console to deploy these resources & clickNext.

Finally, we can clickSave and Deploy to deploy our application!

Now, we can push updates to Master to update our application.

React Native

AWS Amplify also has framework support forReact Native.

To get started with using AWS Amplify with React Native, we'll need to install theAWS Amplify React Native package & then link the dependencies.

npm install aws-amplify-react-native# If using Expo, you do not need to link these two libraries as they are both part of the Expo SDK.react-native link amazon-cognito-identity-jsreact-native link react-native-vector-icons

Implementing features with AWS Amplify in React Native is the same as the features implemented in the other steps of this workshop. The only difference is that you will be working with React Native primitives vs HTML elements.

Removing Services

If at any time, or at the end of this workshop, you would like to delete a service from your project & your account, you can do this by running theamplify remove command:

amplify remove authamplify push

If you are unsure of what services you have enabled at any time, you can run theamplify status command:

amplify status

amplify status will give you the list of resources that are currently enabled in your app.

Deleting entire project

amplify delete

About

Building Serverless React Applications with AWS Amplify

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors3

  •  
  •  
  •  

[8]ページ先頭

©2009-2025 Movatter.jp