Coder Social home page Coder Social logo

project-todos's Introduction

Project Todos📄

With this projec I am continuing my journey with Redux by starting to write my own reducers and actions. In the finished to-do app, I am able to add tasks, list tasks and toggle whether a task is done or not.

The problem

  1. As always, start by sketching out what the app will look like and how I'd like to use components helped a lot. Now we're using redux, I can very easily break things into many small, manageable components.
  2. Once I had the rough sketch, It was about how the data in your store should look. "What data does a todo task contain?" Knowing how my data will look helped a lot when writing the redux actions and then using that data in my components.
  3. Once I've made your first slice, I used combineReducers and configureStore to create a store in App.js which can be passed to a Provider as shown in the codealong.
  4. With all that set up, I started creating components: TaskList component which uses useSelector from the 'react-redux' package to fetch the list of todos and map over them.
  5. Once I have your todos being listed, it was much easier to see actions I start creating working or not!
  6. The next step was to implement some form of addTask action in the tasks reducer which will push a new task into the array of hard coded tasks. I could then set up a form (using useState to control form elements and then pass the values into actions on submit).

View it live🙇🏻‍♀️

haruahn-todo-list.netlify.app

project-todos's People

Contributors

emolsz avatar dependabot[bot] avatar ruruahn avatar idlefingers avatar jenniedalgren 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.