# Random Quote Generator - Feedback on coding aspect

**URL:** <https://forum.freecodecamp.org/t/random-quote-generator-feedback-on-coding-aspect/327669>\
**Category:** I Built This\
**Created:** [November 23, 2019, 8:38pm UTC](https://forum.freecodecamp.org/t/random-quote-generator-feedback-on-coding-aspect/327669 "2019-11-23T20:38:13Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![bish13](https://avatars.discourse-cdn.com/v4/letter/b/d9b06d/32.png) [@bish13](https://forum.freecodecamp.org/u/bish13)\
**Post date:** [November 23, 2019, 8:38pm UTC](https://forum.freecodecamp.org/t/random-quote-generator-feedback-on-coding-aspect/327669/1 "2019-11-23T20:38:13Z")

</div>

Hi,

I’d really appreciate some feedback on the coding aspect of my Random Quote Generator. I’ve not really focussed on any advanced styling as of yet so it is basic (it still passes all of the tests), but I’d like to get some thoughts on how I’ve approached the coding and any tips on how I could make things better/simpler/quicker.

This is my very first attempt at a React app outside of the FCC platform, so I was a little unsure in terms of best practice as to which parts to put in the HTML/CSS/JS sections.

Here is the link: [https://codepen.io/mikebish13/pen/WNNWPap](https://codepen.io/mikebish13/pen/WNNWPap)

Thanks in advance!

Mike

---

<div class="post-metadata">

**Author:** ![lezojeda](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/lezojeda/32/360657_2.png) [@lezojeda](https://forum.freecodecamp.org/u/lezojeda)\
**Post date:** [November 24, 2019, 4:22pm UTC](https://forum.freecodecamp.org/t/random-quote-generator-feedback-on-coding-aspect/327669/2 "2019-11-24T16:22:03Z")

</div>

Your code looks pretty clean and readable overall, great work there mate. One thing I’d add to your fetch after the component mounted (line 14) is an error handler, I think (correct me if I’m wrong tho) that as it is now, if will just display your loading screen forever if something wrong happens.

---

<div class="post-metadata">

**Author:** ![bish13](https://avatars.discourse-cdn.com/v4/letter/b/d9b06d/32.png) [@bish13](https://forum.freecodecamp.org/u/bish13)\
**Post date:** [November 24, 2019, 9:19pm UTC](https://forum.freecodecamp.org/t/random-quote-generator-feedback-on-coding-aspect/327669/3 "2019-11-24T21:19:39Z")

</div>

Thanks very much!! 👍

I’ll give that a try.

---

<div class="post-metadata">

**Author:** ![ILM](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/ilm/32/363239_2.png) [@ILM](https://forum.freecodecamp.org/u/ILM)\
**Post date:** [January 17, 2021, 7:51pm UTC](https://forum.freecodecamp.org/t/random-quote-generator-feedback-on-coding-aspect/327669/4 "2021-01-17T19:51:21Z")

</div>

Closed on January 17, 2021, 7:51pm UTC


