Coder Social home page Coder Social logo

redux-demo's Introduction

Angular Redux Sample Project

This is a sample application showcasing the integration of Redux into Angular, using ng-redux.

The application simulates an SMS client, with 'mark as unread' capabilities. Redux is used to get the messages state, open message, and unread messages counter in sync.

Try it

Run the following commands to get it running locally:

npm install
npm start
open http://localhost:3000/

Source code worth checking out

Here are some files worth looking to get some insights in the benefits of using Redux.

  • Template

    In contrast to an standard Angular application, there's no much (or any) information being passed to smart components in the template.

  • Smart Component

    Smart components are the ones that connect to the store to gather the information they need. In this component, there's a single input binding with the message id, but the message itself is obtained from the Redux store. Also, actions do not change internal component state, but instead are send directly to the store, with help of the bindings provided by $ngRedux.connect.

  • Store

    In this file you can see how ng-redux is setup for this sample application. The store is configured with its reducers, middleware and enhancers.

  • Tests

    Redux code is easy to test, as most of it just handles plain JS objects. In this folder there are examples of reducers and action creators test using mocha and chai.

Develop

You can run the build process and server with watchers with the following command

npm run watch

License

This project is licensed under the terms of the ISC license.

redux-demo's People

Contributors

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