d-quiz
is a trivia application that presents trivia questions as facts rather than as traditional questions. The application fetches trivia data from an API and displays it, making it a unique tool for learning trivia in a more fact-based format.
- Fetches trivia data from an external API.
- Displays trivia data as facts rather than questions.
- Uses Redux for state management.
- Written in React with TypeScript for better development experience and type safety.
- React: Front-end library for building user interfaces.
- TypeScript: Superset of JavaScript adding static types.
- Redux Toolkit: Toolkit for easier Redux setup and usage.
- RTK Query: Data fetching library.
- Tailwind CSS: Utility-first CSS framework for styling.
- Node.js (version 14 or higher)
- npm or Yarn
-
Clone the repository:
git clone https://github.com/linkbroken/d-quiz.git
-
Navigate to the project directory:
cd d-quiz
-
Install dependencies:
npm install # or yarn install
-
Create a
.env
file in the root of the project to add your environment variables. For example:REACT_APP_API_URL=https://api.example.com/trivia
-
Start the development server:
npm start # or yarn start
The application will be available at
http://localhost:3000
.
After starting the development server, navigate to http://localhost:3000
in your browser. You will see trivia facts displayed on the page.
Questions
Component: Fetches trivia data and displays it. Uses Redux to manage and store trivia facts.
The trivia data is fetched from an API endpoint defined in your .env
file under the REACT_APP_API_URL
variable. Ensure this endpoint provides the correct data format expected by the application.
Contributions are welcome! If you have suggestions or improvements, please follow these steps:
-
Fork the repository.
-
Create a new branch:
git checkout -b feature/my-new-feature
-
Make your changes and commit them:
git add . git commit -m "Add some feature"
-
Push your branch to GitHub:
git push origin feature/my-new-feature
-
Open a pull request to the
main
branch of the original repository.
This project is licensed under the MIT License - see the LICENSE file for details.
Feel free to modify the README to better fit any additional features or specific instructions relevant to your project.