|-- workspace
|-- src
|-- components
| |-- ui
| |-- Button.jsx
This file contains hidden or 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 hidden or 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 | |
}; | |
This file contains hidden or 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 { makeActionCreator, makeReducer, composeReducers } from 'redux-toolbelt'; | |
import { clone } from 'ramda'; | |
import cuid from 'cuid'; | |
import { DEFAULT_STATE } from './constants'; | |
const makeAction = makeActionCreator.withDefaults({prefix: "@todo/"}); | |
export const actions = { | |
add: makeAction('ADD'), | |
toggle: makeAction('TOGGLE'), |
This file contains hidden or 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
#!/bin/sh | |
EXTENSIONS=( | |
"Equinusocio.vsc-material-theme" | |
"GrapeCity.gc-excelviewer" | |
"dbaeumer.vscode-eslint" | |
"felixfbecker.php-intellisense" | |
"felixfbecker.php-pack" | |
"formulahendry.auto-close-tag" | |
"ms-vscode.atom-keybindings" |
This file contains hidden or 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} /> |
This file contains hidden or 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
// ... | |
babel: { | |
presets: [], | |
plugins: [ | |
["@babel/plugin-proposal-decorators", { "legacy": true }], | |
] | |
}, | |
// .. |
This file contains hidden or 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
// ... | |
webpack: { | |
alias: { | |
"~": path.resolve(__dirname, "./src/"), | |
} | |
}, | |
// ... |
This file contains hidden or 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 hidden or 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 { Provider } from 'react-redux'; | |
import { BrowserRouter as Router } from 'react-router-dom'; | |
import { I18nextProvider } from 'react-i18next'; | |
import { store } from '../store'; | |
import { trans } from '../translations'; | |
export default class AppProvider extends React.Component { | |
render() { | |
const { children } = this.props; |