bobikenobi12 / haemimont-internship

Online course platform developed in one month for a Haemimont AD internship
MIT License
0 stars 1 forks source link

pagination cache preventing reuse of previous datat #16

Open bobikenobi12 opened 1 year ago

bobikenobi12 commented 1 year ago

If you add keepUnusedDataFor: 0 to course queries, then the new pagination with useAppDispatch works. However using this approach means refetching previously fetched data ( the client sends new http requests ). I think the issue has to do with shallow copying the new new pagination request, so redux thinks the query got the same input, meaning it will subscribe to the previous query with the same input, therefore not rerendering the ui.