Git Product home page Git Product logo

react-event-system-lab-nyc-web-career-031119's Introduction

React Event System Lab

Overview

In this lab you'll respond to events in React and write event handlers.

Keypad

Keypad

Mr. Burns has requested us to build a new keypad component for the nuclear plant, since the last one was way too complicated for his employees to use. We'll keep things super simple instead, and use an <input type="password" /> field to capture input. Here's how to complete the exercise:

  1. In the components/Keypad.js file, create a Keypad React component.
  2. In that component, render an input with the right type.
  3. On that input, add an event handler that listens for the keyUp event.
  4. When that event fires, use console.log to print out the text 'Entering password...'.

Eyes on the ball

Let's say you're in the club with your buddy. The music's blaring, lights are flashing... It's so hard to get his attention! Your job is to create a component that registers whenever he focuses on you, and when his eyes are drifting off.

  1. In the components/EyesOnMe.js file, create a EyesOnMe React component.
  2. In that component, render a button.
  3. On that button, add event handlers that listens for the focus and blur events.
  4. When the focus event fires, use console.log to print out the text 'Good!'.
  5. When the blur event fires, use console.log to print out the text 'Hey! Eyes on me!'.

Resources

react-event-system-lab-nyc-web-career-031119's People

Contributors

annjohn avatar cernanb avatar kjleitz avatar lukeghenco avatar pletcher avatar thomastuts avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

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.