uncovering-world / track-your-regions

Track Your Regions: a web tool for travellers to discover and track areas of interest. Work In Progress...
http://uncovering.world
Apache License 2.0
3 stars 4 forks source link

Implement unified region fetching across all components #196

Open OhmSpectator opened 10 months ago

OhmSpectator commented 10 months ago

Description

The application currently handles the "visible" regions in multiple components (ListOfRegions, RegionsMap, etc.), each making independent API calls to fetch region data. This leads to desynchronized data across components and unnecessary API calls. To address this, we propose implementing a unified fetching mechanism for regions. This will ensure synchronization of region data across all components, including BreadcrumbNavigation and any others that may interact with the regions list, and reduce the number of API calls.

Requirements

Additional Information

Implementing a unified region fetching mechanism may require significant refactoring of the current state management and component structure. The design should consider scalability and maintenance, ensuring that adding or modifying components that consume region data is straightforward. Careful consideration of API call lifecycle, error handling, and loading states is crucial to maintain a smooth user experience.