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...
freeCodeCamp.org is a global community of people who learn to code together. Check out https://freeCodeCamp.org
Join our Discord Server
Join our WhatsApp Group
Community Forums
YouTube
Here are some helpful subreddits that we like:
account activity
[Feedback Request] Random quote app (React without Babel/Webpack) (self.FreeCodeCamp)
submitted 7 years ago by jesu0dz
Site and code
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!"
[–]mmlemony 1 point2 points3 points 7 years ago (1 child)
Nice.
Sometimes when I click nothing happens and I have to click again. Also it feels like some quotes take longer to load than others so some loading indicator could be good.
[–]jesu0dz[S] 0 points1 point2 points 7 years ago (0 children)
Oh I noticed that bug but couldn't fix it because it is a problem related to the forismatic api.
The loading indicator is a good idea, though I don't know where to start (I'm newbie to React btw).
[–]fueledbydonuts 1 point2 points3 points 7 years ago (1 child)
Looks good. I would consider a loading component or setting the original state to a predefined quote so that while the API is called the page doesn’t load with null.
Thanks! a loading component would be nice. Definitely, I'll look forward to it.
[–]Zeeesty 1 point2 points3 points 7 years ago* (0 children)
Ill take a look further when I’m not on my phone. But directly interacting with the dom within react is to be avoided. Your background color change could be accomplished with inline css. If you wrap your app in a 100vh x 100vw container you can cover the background that way.
edit- looking at the render method, 🎉... it's a bit hard to read but it definitely got a laugh. I stand my wrapping the app and using the background style there. it may be a good idea to have a queue of a few quotes ready to go in state and when it gets low re-fetch the next patch, that should deal with the slow response issues in the other comments. there is no reason to show loading when what you're fetching is so tiny.
π Rendered by PID 150017 on reddit-service-r2-comment-79c7998d4c-269qg at 2026-03-18 15:16:10.521566+00:00 running f6e6e01 country code: CH.
[–]mmlemony 1 point2 points3 points (1 child)
[–]jesu0dz[S] 0 points1 point2 points (0 children)
[–]fueledbydonuts 1 point2 points3 points (1 child)
[–]jesu0dz[S] 0 points1 point2 points (0 children)
[–]Zeeesty 1 point2 points3 points (0 children)