LazarevSlava / project-countries-spa

https://lazarevslava.github.io/project-countries-spa/
1 stars 0 forks source link

[improvement] Preserve countries to not load them more than once #19

Closed michey85 closed 7 months ago

michey85 commented 7 months ago

Firstly, on the initial load we should not see the text, that there is no countries. We should show a spinner.

Secondly, when we open details page and then return to the home page we should not load countries again. We should store them and reuse. We can use React Context for this, or move the state on a higher level, or try to use any state management library. It's up to you. But there is no sense to retrieve data more than once.