I need to create a search/filtering functionality which filters and display only the searched result from the RTK query cached data and when the user remove the filter it should show all the cached data what is the best way to do this
I thought of creating a local state variable and update the cached data in the local state variable and display the data using the state and while filtering I use the filtering logic and update the state variable with the returned value from the filtering function, Is this the correct approach or is there any other way we can do it using RTK query?
Derek emmanuel is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.