I can find information on how to write calls to AsyncStorage, how it actually stores information on device, etc., and some basic examples of usage storing keys, but what I'm looking for is a broader understanding of why I would use it.
The reason I'm asking is that I've recently had to refactor one area of our (react-native) mobile-app, which was being buggy and - not unrelated! - had become one unfathomable beast. It was previously a huge single class, and in its componentDidMount/unMount had calls to AsyncStorage, where it was stashing some state variables.
(Judging from the comments, at least part of the reason was to do with the previous developer struggling with understanding how to use/access state within FlatList, but I think it's more than just that)
The refactored code achieves the same goals as before, through several separate functional components, each performing a specific task. Everything FlatList calls is now stateless, and, having just finished testing, all the previous functionality seems to have been matched.
But, I realise I haven't used any calls to AsyncStorage, and I'm left wondering if that is a bad thing? I can imagine that I could stash into AsyncStorage all the state from this part of the app such that if it crashed we could jump back to whatever point we got to. And I suppose that might be handy, in its way. But is that a sensible use of async storage? Is that what y'all are using it for? Was the previous use case a poor one and should I move on without it?
(I appreciate this question is a more concept'y than what I normally look for / ask, and if I should be putting it somewhere else, please do say!)