Coder Social home page Coder Social logo

springload / react-redux-exercise Goto Github PK

View Code? Open in Web Editor NEW
49.0 13.0 23.0 569 KB

Exercise to understand better react-redux, how it works and how to use it.

JavaScript 98.57% HTML 1.43%
react redux tutorial exercise learn learning-exercise react-redux

react-redux-exercise's Introduction

react-redux-exercise

Exercise to understand better React and Redux, how they work and how to use them.

If you like this repo and/or learnt something from it, please give us a star :) Thanks!

Get started

Prerequisites

This project uses nvm.

You need to have it installed on your machine.

Install

To clone the project on your machine, install the required dependencies and run the server, follow these commands:

$ git clone https://github.com/springload/react-redux-exercise.git

$ cd react-redux-exercise

# Install the correct version of Node/NPM with nvm
$ nvm install

# Then, install all project dependencies.
$ npm install

# Then run the server
$ npm run start

# Open your browser to http://localhost:3000

And if you want some eslint love (and you should):

npm run lint . (or specify the path to the file you want to check)

Debugging

I highly recommend that you install the Redux extension for Chrome

It looks like this:

alt Extension image

And it will help you a lot to debug and understand what's going with your code.

Redux

with images

alt Redux image

Source https://www.reddit.com/r/webdev/comments/4r1947/i_am_working_on_a_reactredux_video_tutorial/

alt Redux image

Source http://staltz.com/unidirectional-user-interface-architectures.html

alt Redux image

Source http://blog.tighten.co/react-101-using-redux

with words

Don't be afraid by these images if you find them complicated. Redux just needs to be tested and you will pick it up.

Basically, a Redux cycle works like this:

  • A user clicks on a button on the UI (for instance)
  • This button dispatches an action
  • This action will be managed by a reducer which is listening for one or many actions
  • This reducer will update the store state
  • The new store is then passed to the component which rerenders with the new value

react-redux-exercise's People

Contributors

laurarbunea avatar thibaudcolas avatar vincentaudebert avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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.