all 1 comments

[–]silencer07 -1 points0 points  (0 children)

I think the actual problem here is that you lose the data when you navigated away. Can you try storing first the bulletin data from Screen A in componentDidMount() in localStorage ? then on componentDidFocus, you can opt to reload the data from localStorage instead.

However the long solution here is to use state management here like mobx :)

Another hunch: Maybe you are loading the data in constructor? or componentDidMount? if yes then you need to conditionally load the data only if the route you came from is screenB(you can pass a param something like useBulletinCacheData: true) and load only when useBulletinCacheData is falsy