From e423fe7a1e5709926746a87a15d2135093d926ea Mon Sep 17 00:00:00 2001 From: Munish Date: Mon, 30 Oct 2023 10:40:45 +0200 Subject: [PATCH] Add router & redux store to the application --- src/App.js | 25 ++++--------------------- src/index.js | 20 ++++++++++---------- src/redux/store.js | 4 ++-- 3 files changed, 16 insertions(+), 33 deletions(-) diff --git a/src/App.js b/src/App.js index 34716cb..b5b8479 100644 --- a/src/App.js +++ b/src/App.js @@ -1,28 +1,11 @@ -import logo from './logo.svg'; import './App.css'; +import { Routes } from 'react-router-dom'; function App() { return ( -
-
- logo -

- Edit - {' '} - src/App.js - {' '} - and save to reload. -

- - Learn React - -
-
+
+ +
); } diff --git a/src/index.js b/src/index.js index 3139372..e71f9b2 100644 --- a/src/index.js +++ b/src/index.js @@ -1,13 +1,13 @@ -import React from "react"; -import ReactDOM from "react-dom/client"; -import "./index.css"; -import App from "./App"; -import reportWebVitals from "./reportWebVitals"; -import { BrowserRouter } from "react-router-dom"; -import { Provider } from "react-redux"; -import store from "./redux/store"; +import React from 'react'; +import ReactDOM from 'react-dom/client'; +import './index.css'; +import { BrowserRouter } from 'react-router-dom'; +import { Provider } from 'react-redux'; +import App from './App'; +import reportWebVitals from './reportWebVitals'; +import store from './redux/store'; -const root = ReactDOM.createRoot(document.getElementById("root")); +const root = ReactDOM.createRoot(document.getElementById('root')); root.render( @@ -15,7 +15,7 @@ root.render( - + , ); // If you want to start measuring performance in your app, pass a function diff --git a/src/redux/store.js b/src/redux/store.js index 6063d19..99fe2cc 100644 --- a/src/redux/store.js +++ b/src/redux/store.js @@ -1,5 +1,5 @@ -import { configureStore } from "@reduxjs/toolkit"; +import { configureStore } from '@reduxjs/toolkit'; -const store = configureStore({}); +const store = configureStore({ reducer: {} }); export default store;