issue - Server fetch too many times
AndyLIUMel opened this issue · 1 comments
AndyLIUMel commented
I find whenever the filter/sorting changed, Axios is used to fetch the same remote JSON files, it is not a good practice, as it makes unnecessary server load.
Shall we refactor it so it is only called once?
jeffersonRibeiro commented
Hi Andy! you're absolutely right, we shouldn't make unnecessary server load.
I thought about refactoring and do exactly what you told. However, the idea of this demo is to simulate a fetch to a real API in which the sorting/filtering is performed in the server and not in the client as I'm doing here.
In a real API, the sorting/filtering performed in the server would return a different payload each time a sort/filter param would change