diff --git a/src/index.js b/src/index.js
index 67923c1..0e5ab40 100644
--- a/src/index.js
+++ b/src/index.js
@@ -4,10 +4,16 @@ import { BrowserRouter as Router } from "react-router-dom";
import "bootstrap/dist/css/bootstrap.min.css";
import App from "./components/App";
import "./index.css";
+import configureStore from "./redux/configureStore";
+import { Provider as ReduxProvider } from "react-redux";
+
+const store = configureStore();
render(
-
-
- ,
+
+
+
+
+ ,
document.getElementById("app")
);
diff --git a/src/redux/actions/courseActions.js b/src/redux/actions/courseActions.js
new file mode 100644
index 0000000..5c32f01
--- /dev/null
+++ b/src/redux/actions/courseActions.js
@@ -0,0 +1,3 @@
+export function createCourse(course) {
+ return { type: "CREATE_COURSE", course };
+}
diff --git a/src/redux/configureStore.js b/src/redux/configureStore.js
new file mode 100644
index 0000000..c1130b8
--- /dev/null
+++ b/src/redux/configureStore.js
@@ -0,0 +1,14 @@
+import { createStore, applyMiddleware, compose } from "redux";
+import rootReducer from "./reducers";
+import reduxImmutableStateInvariant from "redux-immutable-state-invariant";
+
+export default function configureStore(initialState) {
+ const composeEnhancers =
+ window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose; //add support for Redux dev tools
+
+ return createStore(
+ rootReducer,
+ initialState,
+ composeEnhancers(applyMiddleware(reduxImmutableStateInvariant()))
+ );
+}
diff --git a/src/redux/reducers/courseReducer.js b/src/redux/reducers/courseReducer.js
new file mode 100644
index 0000000..c080300
--- /dev/null
+++ b/src/redux/reducers/courseReducer.js
@@ -0,0 +1,9 @@
+export default function courseReducer(state = [], action) {
+ switch (action.type) {
+ case "CREATE_COURSE":
+ return [...state, { ...action.course }];
+
+ default:
+ return state;
+ }
+}
diff --git a/src/redux/reducers/index.js b/src/redux/reducers/index.js
new file mode 100644
index 0000000..5c5859d
--- /dev/null
+++ b/src/redux/reducers/index.js
@@ -0,0 +1,8 @@
+import { combineReducers } from "redux";
+import courseReducer from "./courseReducer";
+
+const rootReducer = combineReducers({
+ courses: courseReducer
+});
+
+export default rootReducer;