Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ module.exports = {
},
plugins: ['react', 'react-hooks', 'jest'],

extends: ['prettier', 'prettier/react', 'prettier-standard', 'plugin:react/recommended'],
extends: ['prettier', 'prettier-standard', 'plugin:react/recommended'],
rules: {
'prettier/prettier': ['error', prettierOptions],
'import/no-webpack-loader-syntax': 0,
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [10.x]
node-version: [12.x]
steps:
- uses: actions/checkout@v1

Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
# next.js
/.next/
/out/
.idea

# production
/build
Expand Down
9 changes: 7 additions & 2 deletions app/configureStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import { createStore, applyMiddleware, compose } from 'redux';
import createSagaMiddleware from 'redux-saga';
import { createWrapper } from 'next-redux-wrapper';
import { createInjectorsEnhancer } from 'redux-injectors';

import createReducer from './reducers';

Expand Down Expand Up @@ -36,9 +37,13 @@ export default function configureStore(initialState = {}) {
const middlewares = [sagaMiddleware];

const enhancers = [applyMiddleware(...middlewares)];
const runSaga = sagaMiddleware.run;
const injectEnhancer = createInjectorsEnhancer({
createReducer,
runSaga
});

const store = createStore(createReducer(), initialState, composeEnhancers(...enhancers));

const store = createStore(createReducer(), initialState, composeEnhancers(...enhancers, injectEnhancer));
// Extensions
store.runSaga = sagaMiddleware.run;
store.injectedReducers = {}; // Reducer registry
Expand Down
5 changes: 3 additions & 2 deletions app/reducers.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@

import { combineReducers } from 'redux';

import { appReducer } from './store/reducers/app';
import { appReducer } from '@store/reducers/app';

export default function createReducer() {
export default function createReducer(injectedReducer = {}) {
const rootReducer = combineReducers({
...injectedReducer,
app: appReducer
});

Expand Down
58 changes: 0 additions & 58 deletions app/utils/injectSaga.js

This file was deleted.

85 changes: 0 additions & 85 deletions app/utils/sagaInjectors.js

This file was deleted.

129 changes: 0 additions & 129 deletions app/utils/tests/injectSaga.test.js

This file was deleted.

Loading