Coder Social home page Coder Social logo

redux-counter's Introduction

Redux Counter

Topics

  • Immutability in JavaScript
  • Redux
  • Actions
  • Reducers
  • The central store
  • Connecting React components to Redux

alt text

In this Project, you'll be eased into the code base of a small Redux application. The application itself is just a counter with increment and decrement buttons.

Counter Project

  • The increment button should increment the counter by 1.

  • Conversely, the decrement button should decrement the counter by 1. The aim of this project is to familiarize you with the overarching data flow pattern of Redux, as well as exposing you to how Redux is typically hooked up to a React application.

  • To run the project code, use the command yarn from the root directory to install your node_modules. Then yarn start. You'll see that the application isn't working.

  • There are a couple of spots in the application where you'll need to write the code to get the application functional.

  • These spots are in reducers/index.js, actions/index.js, and components/Counter.js.

The code is pretty heavily commented. This is to help clear up everything that is going on with the code you have been provided.

When it comes to setting up a Redux application and hooking it up to React components, there is a decent amount of boilerplate, but the benefits that Redux gives you when it comes to predictability and simplicity of your data flow are worth it - especially when your application scales out and becomes much larger!

Take your time walking around the code base. There are lots of informative little tidbits in the comments that you won't want to miss. I highly encourage you to look at every file first before trying to write any code.

If you end up finishing quickly, you'll see there are a few Stretch Problem prompts at the top of the Counter.js component file. Feel free to take a stab at implementing those. Or, you could take a look at the awesome Redux documentation here.

Good luck and have fun!

redux-counter's People

Contributors

seanchen1991 avatar wlharvey4 avatar mixelpixel avatar ryan-hamblin 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.