Git Product home page Git Product logo

react-poems's Introduction

React Poems

This project will require you to use inverse dataflow and declarative state updates.

Set Up

  • Open the terminal
  • Run npm install
  • Run npm start

Deliverables

  • As a user, I should be able to:
    • Read a list of poems
    • Create a new poem
    • Delete an existing poem
    • Update the content of an existing poem

Tips on Inverse Dataflow

  • Remember that inverse dataflow is the process of "creating your own events"
  • Simply pass a function as a prop to another component, and invoke the function there

Tips for Declarative State Updates

  • Make your input visible: Log state, and any variables you're using when updating state, before you call setState
  • Make your output visible: Log state at the beginning of your render method
  • Think of declarative state updates like puzzles. You can see your input, you can see your output, how is the output different from the desired output and what can you change to get you closer?

Helpful Tools:

...

The spread operator can be used to copy the contents of an Array or Object into a new Array or Object.

array.filter

The .filter iterator takes in a callback, and returns a new array containing every element for which the callback returned true Example:

[1, 2, 3, 4, 5].filter( num => num > 3) // => [ 4, 5 ]
array.slice

The .slice method takes in two numbers, a starting index an ending index, and returns an array with the elements between the two indexes

react-poems's People

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.