Skip to content

A trivia quiz app that pulls 5 random questions and gives the user 4 answer options to select from. My solution to the "Quizzical" solo project for the Learn React For Free course on Scrimba.

Notifications You must be signed in to change notification settings

ZaidMarrie/quizzical-solo-project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Quizzical (React Solo Project)

This is my solution to the React Quizzical Solo Project on Scrimba. The solo projects are part of the Scrimba Platform's Courses. All the trivia data used in this app is pulled from the Open Trivia DB API

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.

Screenshot

Start Screen Quiz Screen

Links

My Process

Built with

  • HTML
  • CSS
  • JavaScript
  • React (create-react-app)

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 React from "react";
import blobTop from "./images/blobs1.png";
import blobBottom from "./images/blob5.png";

function Opening(props) {
	return (
		<div className="opening">
			<h1 className="opening-title">Quizzical</h1>
			<p className="opening-desc">Some description if needed</p>
			<button className="start-btn btn" onClick={props.initGame}>
				Start quiz
			</button>

			{/* Decorative Elements(blobs) */}
			<img src={blobTop} alt="" aria-hidden="true" className="opening-blob-top" />
			<img src={blobBottom} alt="" aria-hidden="true" className="opening-blob-bottom" />
		</div>
	);
}

export default Opening;

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 trivia quiz app that pulls 5 random questions and gives the user 4 answer options to select from. My solution to the "Quizzical" solo project for the Learn React For Free course on Scrimba.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published