Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
N
next.js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex
next.js
Commits
1d86a092
Unverified
Commit
1d86a092
authored
Sep 25, 2023
by
Abdulghane Jesry
Committed by
GitHub
Sep 25, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update 03-linking-and-navigating.mdx (#55969)
I've removed a duplicated example.
parent
3dc2c1c7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
03-linking-and-navigating.mdx
...your-application/01-routing/03-linking-and-navigating.mdx
+2
-2
No files found.
docs/02-app/01-building-your-application/01-routing/03-linking-and-navigating.mdx
View file @
1d86a092
...
...
@@ -64,7 +64,7 @@ export default function PostList({ posts }) {
You can use [`usePathname()`](/docs/app/api-reference/functions/use-pathname) to determine if a link is active. For example, to add a class to the active link, you can check if the current `pathname` matches the `href` of the link:
```tsx filename="app/components/links.tsx"
```tsx filename="app/components/links.tsx"
switcher
'use client'
import { usePathname } from 'next/navigation'
...
...
@@ -95,7 +95,7 @@ export function Links() {
}
```
```jsx filename="app/components/links.js
x"
```jsx filename="app/components/links.js
" switcher
'use client'
import { usePathname } from 'next/navigation'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment