Warning: useLayoutEffect does nothing on the server with code-hike #343
TangSirOnGit
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi:
I want to do sth with the mdx content before render it. so I read the mdx content by
renderToString
fromreact-dom/server
. but I encountered a warning:The simplest example:
mdx file:
and the mdxLayout.jsx:
if I remove the code content in Mdx file, or comment out the
const contentString = renderToString(children);
in mdxLayout.jsx, the warning will disapear.next.config.js:
code-hike version:
"@code-hike/mdx": "^0.8.0",
Beta Was this translation helpful? Give feedback.
All reactions