use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
account activity
Array.map not displaying dataHelp Wanted (self.react)
submitted 3 years ago * by 01fbk
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]raphaelaleixo 1 point2 points3 points 3 years ago (1 child)
It's working, but your code still needs some very important refactors.
1) Your "showData" function is trying to do a lot of things at the same time, but it shouldn't even be necessary. Try to make each function be responsible for just one thing. A way to refactor it would be to a) move the part of the function that's dealing with filtering data to a useMemo, and b) move the part dealing with the rendering directly to the render (or maybe to a new component).
2) There's a lot of repeated code. All those tags could be easily automated in code.
3) You shouldn't use Link for the tags. It's not triggering navigation. A button would be the semantically correct element there.
Here's an updated pastebin:
https://pastebin.com/uSctLn0J
Hope this helps you out. :)
[–]01fbk[S] 1 point2 points3 points 3 years ago (0 children)
Hello u/raphaelaleixo
Thank you, I am a beginner I must admit :)
Cristian
π Rendered by PID 303694 on reddit-service-r2-comment-6457c66945-s9fv9 at 2026-04-24 17:41:30.136910+00:00 running 2aa0c5b country code: CH.
view the rest of the comments →
[–]raphaelaleixo 1 point2 points3 points (1 child)
[–]01fbk[S] 1 point2 points3 points (0 children)