Giter Club home page Giter Club logo

devslopes-traffic-light's Introduction

# Traffic Light In this assignment we will be building traffic lights in order to practice using react state. Let's get this show on the road! ( pun intended ) | ๐Ÿ”ด | ๐Ÿ”ด | | ๐ŸŸก | ๐ŸŸก | | ๐ŸŸข | ๐ŸŸข | ## Learning Objectives In order to complete this assignment, a student should be able to... - work with state inside of a single isolated component - use `onClick` handlers to trigger state changes - understand what state is and why we use it - use conditional rendering ## In order to pass this assignment you should Note: _You can copy and paste these checklists into your new repository and fill them out to make sure that you solved everything we are asking for_ ### Standard Requirements - [] Setup eslint - [] Pass all linting checks - To check if linting passes, run `npm run lint` - [] Format code with prettier - [] State should not be duplicated - [] Variables should be named logicially - [] No unneccessary console logs - [] No commented out blocks of code (Code comments are fine) - [] Setup a github repository with your submission as the `main` branch, you will submit a link to this for grading (NOT A ZIP FILE) ### Assignment Specific Requirements - [] The state of a traffic light should go in the following order and repeat indefinitely - Red, Green, Yellow - If the color is red, and you click `nextState`, the light should change to green - If the color is green, and you click `nextState`, the light should change to yellow - If the color is yellow, and you click `nextState`, the light should change to red - [] The correct circle should correspond with the correct position - red light should be the top light - yellow light should be the middle light - green light should be the bottom light - [] Next State button should go to the next state on the functional traffic light - [] Next State button should go to the next state on the class based traffic light # devslopes-traffic-light # devslopes-traffic-light # devslopes-traffic-light

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.