DEV Community

Cover image for How to Make Quote Generator in React
Reactjs Guru
Reactjs Guru

Posted on • Originally published at

How to Make Quote Generator in React

In this article, we are going to make a quote generator in react. We will use a JSON file to get a random quote, this will allow our application to get a unique and new quote every time as we refresh the application. In this application we will add a lets say textarea and a button to refresh the quote.

This project won’t be too hard to do, but it will be very simple and easy to do. So let’s make this application step-by-step.

Pre-requisites to Make Quote Generator in React

  • Basic knowledge of ReactJS.
  • Basic knowledge of CSS.
  • Basic knowledge of React props and hooks.

Customizing App Component

Firstly, we will make some changes in App.js component. Here we have added our Quote component, in which we will add our main logic. Then we have imported App.css file, in which we will have some basic style of course. And lastly, we have just called in here to access Quote.js. As we can see, our App.js file is pretty straight-forward and clean, this is the power of react components. We will add logic in our Quote.js file, so let’s move to it.Read More

Top comments (0)