Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/3d-dev/react-router-v6
tested the React-router lastest version 6 in codeSandbox
https://github.com/3d-dev/react-router-v6
axios-react browserrouter goback react react-router-dom-v6 react-router-v6 refresh sample-code usenavigate
Last synced: about 2 months ago
JSON representation
tested the React-router lastest version 6 in codeSandbox
- Host: GitHub
- URL: https://github.com/3d-dev/react-router-v6
- Owner: 3D-Dev
- Created: 2022-06-28T17:54:56.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-06-28T20:28:10.000Z (over 2 years ago)
- Last Synced: 2024-06-02T07:40:57.053Z (7 months ago)
- Topics: axios-react, browserrouter, goback, react, react-router-dom-v6, react-router-v6, refresh, sample-code, usenavigate
- Language: JavaScript
- Homepage: https://codesandbox.io/s/react-router-v6-new-81moov
- Size: 361 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
# React-Router-V6 & useNavigate & BrowserRouter & Axios
## Installing
```js
npm install
```## add the following import statement:
```js
import { BrowserRouter,Route,Routes } from 'react-router-dom';
```##
```js
} />
} />
```## implemented the module of geting *json data from url using axios
```js
const fetchData = async () => {
let response = await axios.get(
"https://jsonplaceholder.typicode.com/posts/1/comments"
);
if (response.status === 200) {
setUsers(response.data);
}
};
```