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?

沒有答案

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南