Giter Site home page Giter Site logo

classy-chirper's Introduction

Classy Chirper

The goal of this lab is to convert, re-write, or from scratch create the same Chirper lab from the beginning of the React module. Except the design constraint is that it must be written using only Class-based Components.

Getting Started

Create a new project with Create React App.
Delete the src and public directory and all of its contents.
Create a new public directory and a new index.html file inside of public.
Use the ! emmet shortcut to generate a fresh html document in the index.html file. Place <div id="root"></div> in the <body> of the html document you created. (like we did in earlier videos!)
Create a new src directory and a components directory inside of src.
Create an App.jsx and a index.js file inside of src.
Write the basic "entry point" code for the index.js file, avoid copy/paste so you can practice writing it yourself!

// inside of src/index.js import React from 'react'; import ReactDOM from 'react-dom'; import App from './App';

ReactDOM.render(, document.getElementById('root'));

Write a simple function component that returns some JSX for your App.jsx file.

`// inside of /src/App.jsx import React from 'react';

class App extends React.Component { render() { return (

Hello from App Class Component!

); } }

export default App;`

You should now have a project structure that resembles the following:

node_modules/ public/ |- index.html src/ |- components/ |- App.jsx |- index.js .gitignore package-lock.json package.json README.md

Instructions (same as before)

Your objective should be to create a "timeline" of Chirps -- short messages that you post on the Chirper platform.

Your timeline should load with at least three chirps.

Code a form with at least two inputs where users can submit new chirps from.

When a new chirp is submitted it should be shown back to the user in the timeline.

Hints

The walkthrough and lecture's reference material will serve as a great guide to completing this lab.
Remember that a lot of your code will start with this. inside of a class.
Remember to bind your this keyword by using arrow functions in your event handlers.

classy-chirper's People

Contributors

brvarner avatar

Watchers

 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.