React useContext && Category List

by tnob
0 replies
I am building a web app where the user creates a list of goals. The goals have a category and a description. I am displaying these on a GoalsList that maps through the categories and displays a CategoryListItem that is a card displaying the categoryName. Then the CategoryListItem maps over the { goals } and displays the GoalsItem card if the categoryName in the goal matches the categoryName on the CategoryListItem.

Also on this GoalsList, I have an AddGoalForm that has a category selector and a goal description input. Once submitted, the goal is added to a firestore backend. The goal should populate the CategoryListItem described above.

HOWEVER, I am getting an error when I addGoal.

I am using context to fetch the goals and for the CRUD functions.

Anyone know React well enough to lend a hand here?
#andand #category #list #react #usecontext

Trending Topics