What do you want to happen?
I want to be able to render the like count for each review post
What is actually happening?
My likeReducer is being updated for each post (which is what I want) but it's only rendering the data stored in the latest update. I'd ideally like to be able to render the reducer data for each iteration of posts -- Currently I believe I have my code set up so that it runs my "FETCH_REVIEW_LIKES" every time a post is rendered. UseEffect (Line 22 in the ReviewPost.jsx component.)
I've included pictures of my sql query:
SELECT * FROM "review_likes"
WHERE "review_id" = $1;
using req.params to send over the review id.
Saving the response.data in an array in the reducer.
no errors
Screenshots / Code Snippets
What did you try? Who did you ask?
Talked over conceptual concepts with kristin and alex -- Thought about restructuring my db Table but I feel like I should be able to make this work?? I'm just missing some pieces.
no debugging ... just help with concepts on how to execute
Description
Your Real Name
Janet Scanlon
What do you want to happen? I want to be able to render the like count for each review post What is actually happening? My likeReducer is being updated for each post (which is what I want) but it's only rendering the data stored in the latest update. I'd ideally like to be able to render the reducer data for each iteration of posts -- Currently I believe I have my code set up so that it runs my "FETCH_REVIEW_LIKES" every time a post is rendered. UseEffect (Line 22 in the ReviewPost.jsx component.)
I've included pictures of my sql query: SELECT * FROM "review_likes" WHERE "review_id" = $1;
using req.params to send over the review id.
Saving the response.data in an array in the reducer.
no errors
Screenshots / Code Snippets
What did you try? Who did you ask?
Talked over conceptual concepts with kristin and alex -- Thought about restructuring my db Table but I feel like I should be able to make this work?? I'm just missing some pieces.
no debugging ... just help with concepts on how to execute
What branch is your code on? Did you git push?
feature/likes
When was the last time you took a break?
20 minutes ago