Skip to content

A-4-Atom/Quizzical

Repository files navigation

Quizzical (React Solo Project)

A quiz web application that uses the Open Trivia Database API to retrieve trivia questions renders only five questions, and the player's score is displayed along with the correct answers.

Overview

The challenge

  • To conditionally render two screens (start screen & quiz questions screen)
  • To pull 5 questions from the The Open Trivia Database(OTDB) API
  • Tally correct answers after check answers button is clicked
  • Style and polish the app as in the figma design.

Screenshots

Start Screen Quiz Screen

Links

My Process

Built with

  • HTML
  • CSS
  • JavaScript
  • React Vitejs

What I learned

I learned and practiced the following concepts:

  • React Props
  • React State
  • React Hooks
    • useState
    • useEffect
  • Conditional Rendering

A snippet of the code I used:

import blobTop from "../assets/blobTop.svg";
import blobBottom from "../assets/blobBottom.svg";
export default function OpeningPage(props) {
  console.log("Developed & Designed by Vikas Chauhan");
  return (
    <div className="openingpage-container">
      <h1>Quizzical</h1>
      <p>Test your knowledge</p>
      <button onClick={props.isGameStarted}>Start Quiz</button>
      <img className="blob-top" src={blobTop} alt="" />
      <img className="blob-bottom" src={blobBottom} alt="" />
    </div>
  );
}

Author

Contributing

Pull requests are very welcome and you may freely fork this repository.

Supporting Scrimba

Since 2017, scrimba has created over 20 free courses and continue's launching free courses. If you perhaps are interested in learning or maybe just would like to up your skills try out their courses at scrimba.com.

License

MIT

About

A Quiz app made with React and OTDB API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published