Code Monkey home page Code Monkey logo

clock's Introduction

Sprint 3 โ€“ Build a Clock

In today's assignment we're going to practice using state in React by building a clock, by following the official React tutorial.

How to complete this assignment

Project setup

In the "code" folder in this assignment you'll find a copy of the Technigo React starter project which you can use as a base to complete this assignment. In the terminal, "cd" into that folder and install dependencies by running npm install. Once that's done, you can start the project by running npm start.

Follow the tutorial

We'll be starting the tutorial from the "Adding Local State to a Class" section - https://reactjs.org/docs/state-and-lifecycle.html#adding-local-state-to-a-class

The starter code in the /code/src/index.js in this assignment is built to reflect the project at that point in the tutorial, so you should be able to follow from there! It's a little more minimal than the usual setup we use, with multiple components.

๐Ÿ“š Reading List


๐Ÿ†˜ How to get help

Learning how to think as a web developer is learning how to be an expert in problem solving. So whenever you get stuck start with step 1 and continue until problem solved.

  1. Google! In English, type in the error message if there is one, search within the language you're using (ie CSS, JavaScript etc).
  2. Ask your code buddies in your team.
  3. Ask your fellow students in Slack.
  4. Ask the teacher. Please note: we are part of a sharing community - share the answer with your fellows.

๐Ÿ’ฅ Success!

After completing this assignment you should understand more about state in React.


๐Ÿƒ Stretch Goals

Done with the main task? Here's some ideas for things to continue with:

  1. Make a button which, when pressed, pauses the clock.
  2. Make another button which makes the clock run again.
  3. Use CSS to make the clock look fancy.
  4. Use CSS to make the page look different based on the time of day.

clock's People

Contributors

hannapettersson avatar idlefingers avatar louisebohlin avatar sirihonig avatar

Watchers

James Cloos 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.