Arquisoft / lomap_en1b

LoMap Software architecture group en1b course 2022_23
http://lomap.mariopdev.com
1 stars 1 forks source link

Implement locations filter in redux cache #72

Closed Elias-Llera closed 1 year ago

Elias-Llera commented 1 year ago

In order to improve performance, we are going to try to implement the filters in the REDUX cache instead of specific calls to the server.

MarioP-Dev commented 1 year ago

As we're implementing the API calls with RTK Query, the cache behavior is already defined. React components suscribes to the data according to the hook and parameters. Once that component is unmounted, data will be deleted in 60 seconds. In order to refetch the data from the API without unmounting the component, we should use the refetch function:

const { data, refetch } = useExampleQuery(1)

So, in order to implement the filters, I should work together with the "FrontEnd team" and wait until UI is updated with the filter buttons to add the functionality

MarioP-Dev commented 1 year ago

Nothing to do with Redux, only webapp