Suppose that I have two components A and B and within component B I want to count the number of items in one of the states of component A based on some criteria set in component B.
In practice what I have is a table of values and when I click the a button I want to count all the values that have today's date but when I try to implement this the state containing that data is never initialized even though the table component has rendered correctly.
That that I am using hooks.