Your Docusaurus site did not load properly.

A very common reason is a wrong site baseUrl configuration.

Current configured baseUrl = / (default value)

We suggest trying baseUrl =

Getting Started

Redux is a phenomenally powerful tool, and it can be a true joy to work with. But it takes time to find good tooling and develop healthy patterns.

Retreon aims to provide good patterns and strong types out of the box, including tools for async actions and error handling. Retreon is FSA compliant.

Here's a taste:

// actions.ts
const changeTheme = createAction('change-theme', (theme: Theme) => {
localStorage.setItem('theme-preference', theme);
return theme
})
// reducer.ts
const reducer = createReducer({ theme: 'light' }, handleAction => [
handleAction(changeTheme, (state, theme) => {
state.theme = theme
}),
])

If you prefer to learn by example, take a gander at the examples directory, or check out TodoMVC to see a functioning application.

Be aware that retreon is designed for TypeScript, and while it works fine in vanilla JS, you lose a lot of value. All the examples are written assuming you're using TypeScript.

Installation#

Retreon can be installed through npm.

# NPM
npm install retreon
# Yarn
yarn add retreon

Retreon depends on middleware to implement async actions and error handling. Once it's installed, register it with your redux store:

// Wherever you create your redux store...
import { middleware } from 'retreon'
createStore(reducer, applyMiddleware(middleware))