Add a first version of synchronisation
Remove redux-offline dependency
make the redux state fully immutable
TODO: better error management
TODO: make syncronization work automatically
import { combineReducers } from 'redux-immutable';
import { routerReducer } from 'react-router-redux';
import notes from './notesReducer';
import { sessions } from './sessionsReducer';
import { isAuthenticated, currentUser, login, register, token, groups, createGroup, clientId } from './authReducer';
import { autoSubmit, online } from './miscReducer';
import { isSynchronizing, lastSync } from './syncReducer';
const rootReducer = combineReducers({
sessions,
notes,
login,
register,
authStatus: combineReducers({
token,
currentUser,
isAuthenticated,
clientId,
lastSync
}),
status: combineReducers({
isSynchronizing,
online
}),
router: routerReducer,
autoSubmit,
groups,
createGroup,
});
export default rootReducer;