useSwr in next js 13 appdir #2859
Answered
by
ananuness
Bravemobin
asked this question in
Q&A
-
I can use useswr just in client component but i want use this in server component |
Beta Was this translation helpful? Give feedback.
Answered by
ananuness
Dec 27, 2023
Replies: 1 comment
-
Hii! I don't know if you already found the answer, but it's good to remember that you can add Client components to your Server components! Therefore, it is good to separate any block of code that needs the "use client" in another file and then import it into the Server component. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
Bravemobin
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hii! I don't know if you already found the answer, but it's good to remember that you can add Client components to your Server components! Therefore, it is good to separate any block of code that needs the "use client" in another file and then import it into the Server component.