csantiago132
2/24/2020 - 4:58 AM

A guide on how to easily migrate from Redux to React Context API

A guide on how to easily migrate from Redux to React Context API

import * as React from 'react'
import { reducers } from '../path/to/reducers.js'

/**
 * Combines all reducers into one to create the root reducer of the
 * application
 *
 * @param {object} reducers
 */
export const combineReducer = (reducers) => {
  const globalState = {};
}
import homeReducer from '../path'
import anotherReducer from '../path'

export const reducerExample = {
    home: homeReducer,
    example: anotherReducer
}