CFKeef / react-lab-1

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

React Lab 1

Toggle Boards Exercise

In this lab you're given starter that displays three boards with borders and a toggle button. Your task is to fill in the code that will make the next board become active (have a green border), when the toggle button is clicked. A description of the behavior is below

  • Initially, the first board is active and has a green border.
  • When you press the toggle button, the second board should be active, and the first one should be inactive.
  • When you reach the last board, and you press the toggle button, the first one should become active again.

To start off and understand the desired toggle effect, try changing let isSelected = ii === 0; to let isSelected = ii === 1;

To submit

  • Make a fork of this repository
  • Clone your own fork
  • Solve the lab
    • to get started run npm install once to install the packages
    • to start the react app install npm start
  • Commit and push your code to your forked repository
  • Make a pull request back to this repository
    • Mention your Instructor and TA's names in your pull request message

Credit

This lab is based on and a React 17 / ES6 update to the excellent tutorial found at: https://buildwithreact.com/

About


Languages

Language:HTML 51.6%Language:JavaScript 39.9%Language:CSS 8.5%