[RSC - client directive] : Not working has expected #423
Unanswered
StephaneIzi
asked this question in
Q&A
Replies: 1 comment
-
Possibly related to this #309 (comment) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, first thank you for this amazing repository ❤️ .
contentlayer
has been really useful to me lately.TLDR : Should i expect
contentlayer
to handle React Component withclient directive
inside MDX ?I want to use
contentlayer
to hold all my content (mdx
files)The stack is :
nextJS 13
contentlayer
tailwind
Here is a repo with the stack : https://github.com/Stephane-Pires/contentlayer-mdx-client-directive
I started with MDX using @next/mdx (commit : 1ef8551c6206eb44f0f1717f2f8c32eef7da22d0) , everything was working fine, i was able to import Component with and without
use client
directive directly inside mymdx
files. (Below agif
of the working<Counter />
Button)file : https://github.com/Stephane-Pires/contentlayer-mdx-client-directive/blob/main/content/hello.mdx
Screen.Recording.2023-04-16.at.18.58.20.mov
Then i tryied MDX using @contentlayer & @next-contentlayer(commit : a3c027e455de3fda8b329ad2e2113b0c38c042e4)
I configured
contentlayer
Removed the
<Counter />
component from the MDXgenerate the
.contentlayer
with the CLInpx contentlayer build
due to No.contentlayer
folder is generated in Next.js 13.3 #415 (i think)Everything is working has expected.
Things started to go off track when i added the
<Counter />
component insideMDX
files.I tryied :
From my understanding so far,
contentlayer
could handle Client Componenthttps://github.com/contentlayerdev/contentlayer/releases
My question is : Should i expect
contentlayer
to handle React Component withclient directive
inside MDX ?P.S : I really want to use
contentlayer
thetypes
generation is a big plus for me !Thanks for reading !
Beta Was this translation helpful? Give feedback.
All reactions