Skip to content

Commit 01946e3

Browse files
author
a.fedorovskyi
committed
added redux-logger
1 parent 50d080c commit 01946e3

File tree

8 files changed

+399
-54
lines changed

8 files changed

+399
-54
lines changed

.eslintrc

+1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
"@typescript-eslint/default-param-last": "off",
3333
"import/prefer-default-export": "off",
3434
"import/no-cycle": "off",
35+
"import/no-extraneous-dependencies": "off",
3536
"react/react-in-jsx-scope": ["off"],
3637
"react/jsx-uses-react": ["off"],
3738
"react/jsx-props-no-spreading": ["warn"],

package-lock.json

+369-40
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+5-4
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
"react": "^18.2.0",
1919
"react-dom": "^18.2.0",
2020
"react-redux": "^8.0.5",
21-
"react-router": "^6.6.1",
22-
"react-router-dom": "^6.6.1",
21+
"react-router": "^6.6.2",
22+
"react-router-dom": "^6.6.2",
2323
"react-scripts": "5.0.1",
2424
"redux": "^4.2.0",
2525
"reselect": "^4.1.7",
@@ -48,7 +48,7 @@
4848
]
4949
},
5050
"devDependencies": {
51-
"@typescript-eslint/eslint-plugin": "^5.48.0",
51+
"@typescript-eslint/eslint-plugin": "^5.48.1",
5252
"eslint": "^8.31.0",
5353
"eslint-config-airbnb": "^19.0.4",
5454
"eslint-config-airbnb-typescript": "^17.0.0",
@@ -59,7 +59,8 @@
5959
"eslint-plugin-prettier": "^4.2.1",
6060
"eslint-plugin-promise": "^6.1.1",
6161
"eslint-plugin-react": "^7.31.11",
62-
"prettier": "^2.8.2"
62+
"prettier": "^2.8.2",
63+
"redux-logger": "^3.0.6"
6364
},
6465
"resolutions": {
6566
"styled-components": "^5"

src/App.test.tsx

-9
This file was deleted.
+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import * as React from 'react';
2+
3+
const ForTesting: React.FC = () => {
4+
return <div>Hello Component</div>;
5+
};
6+
7+
export default ForTesting;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import * as React from 'react';
2+
import { render } from '@testing-library/react';
3+
import ForTesting from '../ForTesting';
4+
5+
describe('ForTesting', () => {
6+
test('render', () => {
7+
render(<ForTesting />);
8+
});
9+
});

src/components/ForTesting/index.ts

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import ForTesting from './ForTesting';
2+
3+
export default ForTesting;

src/store/index.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
import { configureStore } from '@reduxjs/toolkit';
2+
import { createLogger } from 'redux-logger';
23
import rootReducer from './rootReducer';
34

4-
// browser history
5+
const logger = createLogger({
6+
collapsed: true,
7+
});
58

69
const store = configureStore({
710
reducer: rootReducer(),
11+
middleware: (getDefaultMiddleware) => getDefaultMiddleware().concat(logger),
812
});
913

1014
export type RootState = ReturnType<typeof store.getState>;

0 commit comments

Comments
 (0)