Currently, the entire app is taking place in React. A fetch request is generated in the main container file inside of the
componentWillMount() function. This fetch request is directed towards a JSON file I found that matched my needs on GitHub. The fetch request then populates the component state with the contents of the JSON.
Later in the return function, I have a function tied to an
onClick event which runs a randomizer function. This function sets another state to be equal to a random dad joke, it is this state which is referenced in the joke card below the CTA.
If I ever come back to this, I want to implement maybe a REGEX, or better yet, find a JSON that is structure how I would like – i.e.
punchline as being separate values (currently they are both included in the same string). If I can get this, I would be able to use some CSS3 animations to maybe flip a card around to reveal the punchline and make the User Experience a little more fun.