This is a small React application to generate Flashcard quizzes.
- I undertook this project to solidify my understanding of connecting a React app to an API to get and render its data dynamically
- Furthermore I wanted to gain further knowledge about animating with CSS
- React 17.0.2
- Open Trivia API
- Generating Flashcard quizzes using the Open Trivia API
- Displaying Flashcard quizzes for different categories (e.g., movies, video games, sports, geography)
- Flipping animation to display questions / answers
- Customizing the amount of questions in the quiz and display them dynamically using CSS Grid
Live demo here.
The dependencies which are necessary to run this app can be found in the package.json file.
- Clone the repo
- Navigate to the project folder in the terminal and install the necessary NPM dependencies
npm install
- Run the app typing
npm start
in your terminal. Visit localhost:3000 in your browser.
- Connecting a React App to an external API (asynchronous requests, rendering the data)
- Using sort() array method to randomly display the possible answers
- Using CSS animations to flip the cards (transform / transform-style)
- Working with the useRef() hook to target specific elements
The project is finished.
- This project was based on this tutorial.