Giter VIP home page Giter VIP logo

scrimba-quizzical's Introduction

Scrimba - Learn React for free Course

Section 4 Solo Project: Quizzical

Scrimba

Live Link

Overview

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.