Skip to content

Latest commit

 

History

10 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Scrimba - Learn React for free Course

Note: This challenge is gone from the updated React courses on Scrimba. The web archive version of this challenge also does not work.

Section 4 Solo Project: Quizzical

Live Link

Overview

Homepage Selection Scoring

Thoughts

  • Originally tried to use radio buttons for answer choices
  • Mapping an answers array to render a radio button - didn't really mix and I didn't find any examples where this was done so I abandoned that idea
  • Shuffled answer choices with code found on Stack Overflow
  • Answers and questions have html-code in them - looked at some other attempts on Github and found a decode function
  • In question, used code equivalent to a nested ternary to conditionally render the styles
  • Didn't conditionally render correct answer
  • Obviously, the idea was to add more conditional rendering practice but since questions repeat on some categories frequently, it may be a positive to not show the correct answer.
  • Didn't style the app as the logic was not as solid as I would have liked
  • handleChoice has way too much logic in it but the overly complicated data structure I started with and worrying about mutating state necessitated it
  • Also performance wise - handleChoice is terrible
  • Updating nested state is still a major disadvantage of React ie callback-esque hell
  • Really hard to tell if you mutated state or not from just looking at the code
  • After screenshots were taken, added a break after question to break it up
  • I duplicated components when making breaking changes - they are the all copy files

Requirements

  • Two Screens (start & questions)
  • Pull 5 questions from the OTDB API
  • Tally correct answers after "check answers" is clicked
  • Styled & Polished

Resources

About

Scrimba Learn React Course - Section 4 Solo Project

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages