Reputation: 21
I have a large json dataset like: [ {"date":"2020-03-02", "state:"Delhi", "district":"East Delhi" ..... ..... } ..... ..... ] I have different filters like date,state,district,gender,age and so on ..I want to show data based on these filter in various Reactjs Components..But it is taking too much time to load on filters which is not very user friendly..the json contains more than 50K objects and loaded locally..I have used for loop and if else conditions to filter the data..But it is taking too much time...Is there any javascript or Reactjs approach to do this differently??
Upvotes: 2
Views: 1074
Reputation: 185
My first advice will be to check what is taking the most of the time:
It is likely that rendering all the data might take the most of the time, because rendering 50k item might be heavy for the browser. So you have multiple options:
Upvotes: 2