Skip to content

Commit fdfeb76

Browse files
srxcodeautofix-ci[bot]amirhhashemi
authored
docs: update navigation links to use native anchor tags (#1632)
* docs: update navigation links to use native anchor tags Replaced the <A> component with native anchor tags for navigation, removed conflicting description. * ci: apply automated fixes * Update src/routes/(2)guides/(2)routing-and-navigation.mdx Co-authored-by: Amir Hossein Hashemi <87268103+amirhhashemi@users.noreply.github.com> * Update src/routes/(2)guides/(2)routing-and-navigation.mdx Co-authored-by: Amir Hossein Hashemi <87268103+amirhhashemi@users.noreply.github.com> --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Amir Hossein Hashemi <87268103+amirhhashemi@users.noreply.github.com>
1 parent cd6b967 commit fdfeb76

1 file changed

Lines changed: 5 additions & 7 deletions

File tree

src/routes/(2)guides/(2)routing-and-navigation.mdx

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -126,13 +126,11 @@ render(
126126

127127
**6. Create links to your routes**
128128

129-
The [`<A>`](/solid-router/reference/components/a) component provides navigation to an application's routes.
130-
Alternatively, you can use the [native anchor tag](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a).
131-
However, the `<A>` component provides additional functionality including properties for CSS, `inactiveClass` and `activeClass`.
129+
Solid Router intercepts the [native `<a>` element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a) to perform client-side navigation.
132130

133131
```jsx
134132
import { render } from "solid-js/web";
135-
import { Router, Route, A } from "@solidjs/router";
133+
import { Router, Route } from "@solidjs/router";
136134

137135
import Home from "./pages/Home";
138136
import Users from "./pages/Users";
@@ -141,8 +139,8 @@ import NotFound from "./pages/NotFound";
141139
const App = (props) => (
142140
<>
143141
<nav>
144-
<A href="/">Home</A>
145-
<A href="/users">Users</A>
142+
<a href="/">Home</a>
143+
<a href="/users">Users</a>
146144
</nav>
147145
<h1>Site Title</h1>
148146
{props.children}
@@ -402,7 +400,7 @@ function PageWrapper(props) {
402400
<div>
403401
<h1> We love our users! </h1>
404402
{props.children}
405-
<A href="/">Back Home</A>
403+
<a href="/">Back Home</a>
406404
</div>
407405
);
408406
}

0 commit comments

Comments
 (0)