-
Notifications
You must be signed in to change notification settings - Fork 196
Closed
Labels
bugSomething isn't workingSomething isn't workingnext.jsquestionFurther information is requestedFurther information is requested
Description
Discussed in #185
Originally posted by khash August 26, 2022
Using NextJS
I'm trying to build a "hint" tag, similar to this from https://stripe.com/docs/connect/collect-then-transfer-guide

This component, should be usable within any text (like in code
) and accept anything as the content of the popover (links, images, etc).
I think this is a simple use case and below is how I've reproduced it. I've removed all code that does that for simplicity in the question:
// hint.markdoc.js
export default {
attributes: {
caption: { type: String },
},
render: ({ caption, children }) => <div><span>{caption}</span><span>{children}</span></div>,
};
// test.md
This is a {% hint caption="hint"%}generated by the tag{% /hint %} as an example
This throws a NextJS Hydration error https://nextjs.org/docs/messages/react-hydration-error.
However the same code with the following works fine:
This is a
{% hint caption="hint"%}
generated by the tag
{% /hint %}
as an example
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingnext.jsquestionFurther information is requestedFurther information is requested