Replies: 1 comment 1 reply
-
const source = await fetch('./path/to/DocCard.jsx').then(r => r.text())
const function = source.match(YourRegExpForTheDocCard).match(etc) // get the function
const functionBody = function.split(...) // remove the header and footer if you want
console.log(functionBody) // Use the string. |
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
-
How can i get the jsx as a string ?
I'm tring to create a wrapper that when you pass a jsx children to it, it renders the component and below a documentation of the jsx
Beta Was this translation helpful? Give feedback.
All reactions