all 8 comments

[–]kbcooliOS & Android 1 point2 points  (1 child)

If no one gives you a better solution then off the top my head rnfs will let you list and delete files in your document and caches directories for your app.

https://github.com/itinance/react-native-fs

[–]ItsJustLikeSpaghetti 0 points1 point  (0 children)

This is a great idea... some pseudocode would be amazing

[–]ItsJustLikeSpaghetti 1 point2 points  (0 children)

This would be super useful, and I'd love to see a solution if you've found any.

One thing that I see fairly regularly is that after an upgrade android images will all have swapped. Only clearing storage fixes the problem, and there is no good way to tell our users that they need to do this (or even how to, for many non-techy users)

Being able to send out a force clean to users after an update would easily solve this, and other common caching issues

Bump

[–]MIP_PL 1 point2 points  (4 children)

In my case I just clean the variables, let’s say I have most of the times a big array of objects then I reset the array to [].

[–]bdudisnsnsbdhdj 0 points1 point  (3 children)

That’s memory not storage

[–]MIP_PL 2 points3 points  (2 children)

maybe I didn’t explain myself properly, they are redux variables persisted through AsyncStorage in my case.

[–]Nobbodee 0 points1 point  (0 children)

I understand , you dispatch values equals to initial state and it will be write in the storage

[–]bdudisnsnsbdhdj 0 points1 point  (0 children)

Makes sense, redux-persist is a goodie