This is a general trivia game to be played with yourself or friends. A trivia game is a fun, engaging competition where players answer questions on various topics. From history and pop culture to science and sports, it tests your knowledge and quick thinking. Players can compete individually or in teams, racing against the clock or each other to see who can score the most points. Trivia games are perfect for parties, family gatherings, or just a casual hangout with friends. They're not just about winning; they spark conversation, laughter, and a bit of friendly rivalry. Ready to flex your brain muscles?
This project was made using Visual Code for the IDE along with React and Vite for compiling the code. This application reaches out to the Open Trivia Database API for the questions displayed in the application.
You can select the trivia category from list of categories available from the Trivia Database API. You can also choose the level of difficulty for the questions. Only five questions are displayed at a time.
The application will tell you how you did on the quiz when you select the "Check answers" button.
Click on the image below to see the live website.
You can clone this repository and save it onto your local computer. Then extract the files from the zip file. From there, open up the folder location with Visual Studio Code and run it with the live server extension. However, you will have to make sure you have NPM installed onto your local machine first and run the following commands in your terminal within Visual Studio Code:
npm install
npm run dev
or combine the terminal commands like:
npm install && npm run dev
If you don't know whether or not NPM is installed on your computer, type "npm -v" into your command terminal first. It should return a number if it is installed. You also have to ensure you are in the right folder directory of this project if you receive an error in the terminal within Visual Studio Code.
The dependencies are React and the Vite compiler. I also used Visual Studio Code to make the project from scratch. Because of the API calls and React used in the project, it must be run in a server environment. Visual Studio Code makes this easy if you enable the "Live Server" extension. If you have questions about that, you can find sources on how to enable the extension on YouTube. Third party libraries used in the project are "nanoid" for creating keys when mapping over arrays and "he" for decoding characters that show up in the information returned from the trivia database.
Color | Hex |
---|---|
Background Color | |
Green Color | |
Text Color | |
Button Color | |
Button Color |
Contributor's names and contact info
Jeremy Tipton
@tiptonspiderj1
- 1.0.0
- Initial Release
If you have any feedback, please reach out to me at tiptonspiderj1@aol.com
Inspiration, code snippets, etc.
At Scrimba our goal is to create the best possible coding school at the cost of a gym membership! 💜 If we succeed with this, it will give anyone who wants to become a software developer a realistic shot at succeeding, regardless of where they live and the size of their wallets 🎉 The Frontend Developer Career Path aims to teach you everything you need to become a Junior Developer, or you could take a deep-dive with one of our advanced courses 🚀
Currently, two official plugins are available:
- @vitejs/plugin-react uses Babel for Fast Refresh
- @vitejs/plugin-react-swc uses SWC for Fast Refresh