Replies: 1 comment
-
I faced same problem, |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi guys!
I have a component that gets the data for a subreddit with posts and every post has a vote:
This works perfectly fine and it renders everything on the screen.
But on my
subredditPost
component (I render asubredditPost
for each post) I have this onClick function when I click the upvote button:It always is undefined in the console.log on the code above. So I get an error and nothing renders on the page anymore. What am I doing wrong? I read it can't get the cache if I use a different key, but I'm using the same key. I pass the
subUrl
from my main component (where i fetch the subreddit), to the post component (where i click the upvote button). So it is exactly the same.Why do I get undefined?
Thx SelfDevTV
Beta Was this translation helpful? Give feedback.
All reactions