Skip to content
This repository has been archived by the owner on Apr 24, 2020. It is now read-only.

Latest commit

 

History

History
45 lines (27 loc) · 2.51 KB

README.md

File metadata and controls

45 lines (27 loc) · 2.51 KB

Redux

Jiskefet uses Redux for state management.

Redux is a predictable state container for JavaScript apps.

It helps you write applications that behave consistently, run in different environments (client, server, and native), and are easy to test. On top of that, it provides a great developer experience, such as live code editing combined with a time traveling debugger.

You can use Redux together with React Mithril, or with any other view library. It is tiny (2kB, including dependencies), but has a large ecosystem of addons available.

Table of Contents

Architecture (re-ducks)

Jiskefet uses the re-ducks modular directory structure.

For more information, see this Medium article covering the motivation for using the re-ducks approach.

Redux Devtools

From the Redux docs:

The extension is a suite of tools which give you absolute control over your Redux store - it allows you to inspect and replay actions, explore your state at different times, dispatch actions directly to the store, and much more.

Redux Devtools Extension GitHub

It is highly recommended to install the devtools when working with the state of Jiskefet. It can be done easily as a browser extension directly from your browser's store.

Reselect

From the reselect GitHub:

Simple “selector” library for Redux (and others) inspired by getters in NuclearJS, subscriptions in re-frame and this proposal from speedskater.

  • Selectors can compute derived data, allowing Redux to store the minimal possible state.
  • Selectors are efficient. A selector is not recomputed unless one of its arguments changes.
  • Selectors are composable. They can be used as input to other selectors.

Redux Thunk

From the redux-thunk GitHub

Thunks are the recommended middleware for basic Redux side effects logic, including complex synchronous logic that needs access to the store, and simple async logic like AJAX requests.