remove mkdocs specific syntax

This commit is contained in:
Marcello 2024-06-16 19:14:59 +02:00
parent 8d08c1964f
commit 8026e1465b
Signed by: m-lamonaca
SSH key fingerprint: SHA256:8db8uii6Gweq7TbKixFBioW2T8CbgtyFETyYL3cr3zk
77 changed files with 1128 additions and 1128 deletions

View file

@ -16,7 +16,7 @@ Router Types:
- *BrowserRouter*: `/route`, uses HTML5 history API to provide clean URLs
- *MemoryRouter*: no URL
```js linenums="1"
```js
// index.js
//other imports ...
@ -31,7 +31,7 @@ React.render(
)
```
```js linenums="1"
```js
// Component.js
import { Route, Route } from "react-router-dom";
@ -52,7 +52,7 @@ import { Route, Route } from "react-router-dom";
### URL Parameters & Query String
```js linenums="1"
```js
// Given
<Route path="/route/:placeholder" element={<Component props={props} />} />
// URL: app.com/route/sub-route?param=value
@ -66,7 +66,7 @@ function Component(props) {
### Redirecting
```js linenums="1"
```js
import { Navigate } from "react-router-dom";
// redirects to another URL on render, shouldn't be rendered on component mount but after an action
@ -80,7 +80,7 @@ props.history.push("/new-route");
### Prompts
```js linenums="1"
```js
import { Prompt } from "react-router-dom";
// displays a prompt when the condition is true
@ -91,7 +91,7 @@ import { Prompt } from "react-router-dom";
Clicks on a link created with React-Router will be captured by react an all the routing will happen client side.
```js linenums="1"
```js
import { Link } from "react-router-dom";
// TARGET: <Route path="/route/:itemId" />