GithubHelp home page GithubHelp logo

diosyahrizal / counter-apps Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 3.79 MB

Redux and Redux Saga in react-typescript

HTML 8.38% CSS 7.37% TypeScript 84.25%
javascript reactjs typescript redux redux-saga

counter-apps's Introduction

Simple Redux-saga with React-Typesript

Table of Contents

Introduction

This is a simple app with the CRD Function, it doesn't have a Update function because we not use the form :). We manage the state with Redux, and use middleware for Redux using Redux Saga

Why Using This Stack?

React with TypeScript

Don't worry guys you will enjoy using it. This is the example of benefit using Typescript :

  • TypeScript simplifies JavaScript code, making it easier to read and debug.
  • TypeScript is open source.
  • TypeScript provides highly productive development tools for JavaScript IDEs and practices, like static checking.
  • TypeScript makes code easier to read and understand.
  • With TypeScript, we can make a huge improvement over plain JavaScript.
  • TypeScript gives us all the benefits of ES6 (ECMAScript 6), plus more productivity.

Check the article in this page for the detail

Redux and Redux Saga

The problem we facing later in development app in React is you will confuse to manage the state. It's possible to passing the state to props, but if you have a lot of component it's gonna be messing your project. The solution for this problem is you can use a state management. Aaand redux is a state management and a pretty popular ones! So we can use it :D

Redux-saga is a redux middleware library, that is designed to make handling side effects in your redux app nice and simple. It achieves this by leveraging an ES6 feature called Generators, allowing us to write asynchronous code that looks synchronous, and is very easy to test.

Description and Flow of the Project

The idea of the project is we will use redux for manage our state such as counter and result globally. And we gonna using a simple REST API. Check this repo for using REST that i build.

Redux-Saga will be a middleware that can manage fetch, store, and delete from the API to our project.

How to Run

Install the package first

yarn install

Run the apps in development mode (Make sure the server is running first)

yarn start

Run apps in production

yarn build

References

Great article about Redux-Saga

Writer: Dio Syahrizal

counter-apps's People

Contributors

diosyahrizal avatar

Stargazers

Roman avatar

Watchers

James Cloos 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.