From 1587d91365dbbb4af24298f02b2e51074053e879 Mon Sep 17 00:00:00 2001 From: Ismail <msiamil.official@gmail.com> Date: Wed, 19 Aug 2020 12:45:33 +0500 Subject: [PATCH] auth reducer created and linked it with redux store --- employeemanagement/src/index.js | 9 ++++++++- employeemanagement/src/store/reducers/authReducer.js | 7 +++++++ 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 employeemanagement/src/store/reducers/authReducer.js diff --git a/employeemanagement/src/index.js b/employeemanagement/src/index.js index f5185c1..b803087 100644 --- a/employeemanagement/src/index.js +++ b/employeemanagement/src/index.js @@ -3,10 +3,17 @@ import ReactDOM from 'react-dom'; import './index.css'; import App from './App'; import * as serviceWorker from './serviceWorker'; +import { createStore } from 'redux'; +import authReducer from './store/reducers/authReducer'; +import { Provider } from 'react-redux'; + +const store = createStore(authReducer); ReactDOM.render( <React.StrictMode> - <App /> + <Provider store = { store }> + <App /> + </Provider> </React.StrictMode>, document.getElementById('root') ); diff --git a/employeemanagement/src/store/reducers/authReducer.js b/employeemanagement/src/store/reducers/authReducer.js new file mode 100644 index 0000000..9248803 --- /dev/null +++ b/employeemanagement/src/store/reducers/authReducer.js @@ -0,0 +1,7 @@ +const initialState = {} + +const authRed = (state = initialState, action) => { + return state +} + +export default authRed; \ No newline at end of file -- GitLab