Skip to content
This repository has been archived by the owner on Jan 9, 2019. It is now read-only.

Latest commit

 

History

History
24 lines (16 loc) · 695 Bytes

import-no-redux-combine-reducers.md

File metadata and controls

24 lines (16 loc) · 695 Bytes

Always import combineReducers from 'state/utils'

In Calypso we should always import combineReducers from state/utils instead of redux. Our reducing function handles persistence for us. If we use the default reducing function from redux, we may persist state accidentally.

See also: Opt-in to Persistence

Rule Details

The following patterns are considered warnings:

import { combineReducers } from 'redux';

The following patterns are not warnings:

import { combineReducers } from 'state/utils';
import { createStore } from 'redux';