Amplify datastore deleting specific list of data

0

My app is a social media clone app. I want a logic like below for my home feed:

amplify api will fetch list of 10 items through pagination -> this 10 items will be showing up to user in feed -> when user reaches the 7th item on the screen I will fetch again 10 items through api call and save it to local datastore-> when user will reach the end item/10th item i will show the next 10 items present in local datastore and I will clear that 10 items in local storage-> and fetch next 10 items-> if user closes app immediately the 10 items will be there in local storage-> next time when user will open app I will show the data without buffer form local storage

My issue is how if user likes a post or makes a comment I will save that to data store for short time and when sync event occurs I will update that like and comment to DynamoDB.

1. My question is how to delete some specific data when some event occurs like list of post?

2. Can we upload new post from datastore? how?

No Answers

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions