A bug was created during the course of the app development. Every time you return to the main view, it fetches and reloads the table. In some cases, the file may not have been uploaded at that point and it goes missing. You need to only load the table at certain times and not when view displays. Move that as part of the fix in this video.
- [Instructor] So, we have a bug in the app.…Whenever we add a new image, it's there for just a second…and then it disappears.…We can add another one, and the same thing will happen.…And this is because whenever viewWillAppear is called,…it's refreshing the list.…And the first thing it does is empty the list,…then it has to go fetch the images again from the server.…So we need to change that.…Back in the code where we're calling checkSignIn,…we need to do this only once per execution of the app.…And a great place to do that is in viewDidLoad.…
So at the bottom of viewDidLoad, we'll call checkSignIn,…and now it'll only be done once per execution.…And if the user is already signed in,…it'll reload the table, fetching from the server,…otherwise, when we come back from another view,…it won't checkSignIn and it won't refresh.…This'll also save us some performance…from hitting the server,…and any data it uses also will be saved…for not hitting the server and slowing the user down.…So let's run the app again.…And make sure that when we add new items,…
- Working with the Amplify toolchain
- Creating a React app
- Adding analytics to a React app with Amplify
- User authentication via AWS
- Using Amplify to simplify account creation and management
- Creating a GraphQL API
- Storing files online
Skill Level Intermediate
AWS API Gateway with HTTP, Lambda, DynamoDB, and iOSwith Bear Cahill1h 33m Intermediate
AWS Security Best Practices for Developerswith Carlos Rivas46m 31s Intermediate
1. AWS Amplify Overview
2. Amplified React App
3. Mobile App Features
4. Serverless Back End
5. Storing Files Online
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.