Does anyone know how to close the drawer using next/link component #2444
Malewooo16
started this conversation in
General
Replies: 1 comment 1 reply
-
Move your entire
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have read previous discussions they said you need to use the "use client directive" but It's not working but on further observation I realised the next/link component is not a traditional a tag it is similar to the Link in react-router meaning it doesn't refresh the page on click rather it routes you to another component I tried using the a tag, it works because the page refreshes as components render but sadly it doesn't work for next/link
`"use client";
import Link from "next/link";
import React from "react";
import { FaBars } from "react-icons/fa";
export default function Sidebar() {
return (
);
}
`
Beta Was this translation helpful? Give feedback.
All reactions