Skip to content

Commit

Permalink
I am setup router installed and add create Browser router
Browse files Browse the repository at this point in the history
  • Loading branch information
paywand007 committed Oct 24, 2022
1 parent 13646aa commit ffd0c54
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 55 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-redux": "^8.0.1",
"react-router-dom": "6",
"react-scripts": "5.0.1",
"web-vitals": "^2.1.0"
},
Expand Down
75 changes: 27 additions & 48 deletions src/App.jsx
Original file line number Diff line number Diff line change
@@ -1,58 +1,37 @@
import React from 'react';
import logo from './logo.svg';
import { Counter } from './features/counter/Counter';
import { Routes, Route } from "react-router-dom";

import './App.css';

function App() {
return (
<div className="App">
<header className="App-header">
<img src={logo} className="App-logo" alt="logo" />
return ( <div className = "App" >
<header className = "App-header" >
<img src = { logo }
className = "App-logo"
alt = "logo" />
<Counter />
<p>
Edit <code>src/App.js</code> and save to reload.
</p>
<span>
<span>Learn </span>
<a
className="App-link"
href="https://reactjs.org/"
target="_blank"
rel="noopener noreferrer"
>
React
</a>
<span>, </span>
<a
className="App-link"
href="https://redux.js.org/"
target="_blank"
rel="noopener noreferrer"
>
Redux
</a>
<span>, </span>
<a
className="App-link"
href="https://redux-toolkit.js.org/"
target="_blank"
rel="noopener noreferrer"
>
Redux Toolkit
</a>
,<span> and </span>
<a
className="App-link"
href="https://react-redux.js.org/"
target="_blank"
rel="noopener noreferrer"
>
React Redux
</a>
</span>
</header>
</div>
);
Edit <code> src / App.js </code> and save to reload. </p> <span>
<span> Learn </span> <a className = "App-link"
href = "https://reactjs.org/"
target = "_blank"
rel = "noopener noreferrer" >
React </a> <span> , </span> <a className = "App-link"
href = "https://redux.js.org/"
target = "_blank"
rel = "noopener noreferrer">
Redux </a> <span> , </span> <a className = "App-link"
href = "https://redux-toolkit.js.org/"
target = "_blank"
rel = "noopener noreferrer" >
Redux Toolkit </a>, <span> and </span> <a className = "App-link"
href = "https://react-redux.js.org/"
target = "_blank"
rel = "noopener noreferrer">
React Redux </a> </span> </header> </div>
);
}

export default App;
export default App;
14 changes: 7 additions & 7 deletions src/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@ import React from 'react';
import { createRoot } from 'react-dom/client';
import { Provider } from 'react-redux';
import { store } from './app/store';
import { BrowserRouter } from "react-router-dom";
import App from './App';
import './index.css';

const container = document.getElementById('root');
const root = createRoot(container);

root.render(
<React.StrictMode>
<Provider store={store}>
<App />
</Provider>
</React.StrictMode>
);
root.render( <React.StrictMode >
<Provider store = { store } >
<BrowserRouter><App /></BrowserRouter>

</Provider> </React.StrictMode>
);
20 changes: 20 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1590,6 +1590,11 @@
redux-thunk "^2.4.1"
reselect "^4.1.5"

"@remix-run/[email protected]":
version "1.0.2"
resolved "https://registry.yarnpkg.com/@remix-run/router/-/router-1.0.2.tgz#1c17eadb2fa77f80a796ad5ea9bf108e6993ef06"
integrity sha512-GRSOFhJzjGN+d4sKHTMSvNeUPoZiDHWmRnXfzaxrqe7dE/Nzlc8BiMSJdLDESZlndM7jIUrZ/F4yWqVYlI0rwQ==

"@rollup/plugin-babel@^5.2.0":
version "5.3.1"
resolved "https://registry.yarnpkg.com/@rollup/plugin-babel/-/plugin-babel-5.3.1.tgz#04bc0608f4aa4b2e4b1aebf284344d0f68fda283"
Expand Down Expand Up @@ -7385,6 +7390,21 @@ react-refresh@^0.11.0:
resolved "https://registry.yarnpkg.com/react-refresh/-/react-refresh-0.11.0.tgz#77198b944733f0f1f1a90e791de4541f9f074046"
integrity sha512-F27qZr8uUqwhWZboondsPx8tnC3Ct3SxZA3V5WyEvujRyyNv0VYPhoBg1gZ8/MV5tubQp76Trw8lTv9hzRBa+A==

react-router-dom@6:
version "6.4.2"
resolved "https://registry.yarnpkg.com/react-router-dom/-/react-router-dom-6.4.2.tgz#115b37d501d6d8ac870683694978c51c43e6c0d2"
integrity sha512-yM1kjoTkpfjgczPrcyWrp+OuQMyB1WleICiiGfstnQYo/S8hPEEnVjr/RdmlH6yKK4Tnj1UGXFSa7uwAtmDoLQ==
dependencies:
"@remix-run/router" "1.0.2"
react-router "6.4.2"

[email protected]:
version "6.4.2"
resolved "https://registry.yarnpkg.com/react-router/-/react-router-6.4.2.tgz#300628ee9ed81b8ef1597b5cb98b474efe9779b8"
integrity sha512-Rb0BAX9KHhVzT1OKhMvCDMw776aTYM0DtkxqUBP8dNBom3mPXlfNs76JNGK8wKJ1IZEY1+WGj+cvZxHVk/GiKw==
dependencies:
"@remix-run/router" "1.0.2"

[email protected]:
version "5.0.1"
resolved "https://registry.yarnpkg.com/react-scripts/-/react-scripts-5.0.1.tgz#6285dbd65a8ba6e49ca8d651ce30645a6d980003"
Expand Down

0 comments on commit ffd0c54

Please sign in to comment.