Git Product home page Git Product logo

pursuit-core-web-react-lifecycles-lab-tested's Introduction

Pursuit-Core-Web-React-Lifecycle-Methods-Lab

Pursuit Logo

Tasks

Build an app that has the following functionality:

  • Users can create a new Todo by typing text into an input inside a form and pressing enter
  • Shows a list of todos with id #todos underneath that input
    • Use an instance of a Todo component for each of the Todos
  • Users can delete an existing Todo by pressing an 'x' button next to it

When a todo is created or deleted, a pop-up "toast" will appear to notify the user that the action has been completed. Implement lifecycle methods to fire the created/deleted notifications:

  • Use componentDidMount in Todo to show a "success" toast with the text New todo added: {todo}
  • Use componentWillUnmount in Todo to show an "error" toast with the text Todo deleted: {todo}

For the toasts notifications, use the react-toastify library that has already been installed with this lab. See its README.md for example usage; you might find the react-toastify gist or the demo playground very helpful in getting started.

todos react app in use

Bonus

Use componentDidUpdate in App to show a toast with the text Remaining todos: {count} whenever the count of todos changes.

Getting Started

  • Fork this repo
  • Clone the forked repository
  • cd to the directory where you cloned it
  • npm install to install dependencies
  • npm run cypress to open the cypress testing window

Note: Remember to git add, git commit and git push regularly

Submission Guidelines

  • When finished, commit and push your work.
  • Make a pull request on github.
  • Submit the link to your pull request on Canvas.

pursuit-core-web-react-lifecycles-lab-tested's People

Contributors

mikeboyle avatar bedonjonathan avatar joshuakgoldberg 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.