Not able to get inside the for loop in React js
I am making a To-Do App. I am using React frontend, Node backend, and Postgresql DB.
I made a component called <TaskLists />
which takes three properties or props:
React setState not grabbing the correct value (value was rendered twice, setState grabbed the value when it was not done rendering)
I have a const called mappedFilter.
mappedFilter takes a while to populate. It renders the first time missing some objects, and renders the second time with all the objects
I have a setState for allItems for (mappedFilter), but it is grabbing the mappedFilter the first time around with missing objects, not once the mappedFilter has gotten done populating with all the fields.
My code: