I am creating a dashboard App with reactjs, ReactContextAPI, apexChart where 1000-length JSON data will be visualized on 7-8 different charts and it includes 6-7 variable filters.
Basic Idea about app structure:
- DefaultContext will be having 1000 arrays of objects
- the data will be synced to the whole component tree.
Two main sub-component are:
- FilterComponent (it filters DefaultContext Data)
- Chart Component (it consumes DefaultContext Data)
Example of Tree:
Issue facing: suppose Filter Component adds a filter and it removes some data from the defaultContext Data so that it can be synced to chartComponent.
Now I am confused about how am I going to get back Data (which was earlier removed from the DefaultContext) if we remove the filter.
How many approaches do I have to it in a better way?
