|-- workspace
|-- src
|-- utils
|-- isEmail.js
|-- isZipcode.js
|-- workspace
|-- src
|-- translations
| |-- i18n.js
| |-- index.js
| |-- locales
| |-- en_ca.json
| |-- pt_br.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// src/state/middlewares/composeEnhancers.js | |
import { composeWithDevTools } from 'redux-devtools-extension'; | |
import { compose } from 'redux'; | |
let composeEnhancers = compose; | |
if (process.env.NODE_ENV === 'development') { | |
composeEnhancers = composeWithDevTools | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import store from './store'; | |
export { | |
store | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { createStore } from 'redux'; | |
import middlewares from './middlewares'; | |
import rootReducer from './reducer' | |
import { DEFAULT_STATE } from './constants'; | |
export default createStore(rootReducer, DEFAULT_STATE, middlewares); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { combineReducers } from 'redux'; | |
import { | |
todoReducer, | |
TodoConstants | |
} from '~/features/todo'; | |
export default combineReducers({ | |
[TodoConstants.NS]: todoReducer | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { TodoConstants } from '~/features/todo'; | |
export const DEFAULT_STATE = { | |
[TodoConstants.NS]: TodoConstants.DEFAULT_STATE | |
}; | |
|-- workspace
|-- src
|-- state
| |-- constants.js
| |-- index.js
| |-- reducer.js
| |-- store.js
| |-- middlewares
| |-- composeEnhancer.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import { Route, Switch } from 'react-router-dom'; | |
import { routes } from '../constants'; | |
import TodoPage from '~/pages/Todos'; | |
import Home from '~/pages/Home'; | |
const RootRoutes = () => ( | |
<Switch> | |
<Route exact path={routes.Home.route} component={Home} /> | |
<Route exact path={routes.Todo.route} component={TodoPage} /> |
|-- workspace
|-- src
|-- routes
| |-- constants.js
| |-- index.js
| |-- components
| |-- Link.jsx
| |-- Links.jsx
| |-- RootRoutes.jsx