Next.js Discord

Discord Forum

Can't pass markdown as props without declaring extra const

Unanswered
Glaucous-winged Gull posted this in #help-forum
Open in Discord
Avatar
Glaucous-winged GullOP
Hello there 👋
I am working on my own Next.js 13 app and facing an issue where I can't pass markdown as props to a component so that it would be rendered in multiple lines.

Here's full description of an issue with all the links: https://stackoverflow.com/questions/77293068/how-to-pass-markdown-as-props-without-declaring-extra-const

If anyone has faced similar issue and know possible solution - please, let me know 🙏

In order to better explain this issue here's github repo that shows the issue when markdown is passed as prop but only one line of markdown could be parsed: https://github.com/tsykin/tsykin-frontend

Feel free to check it out, this repo is automatically get's deployed to Vercel, so you can see live how the app currently looks like: https://tsykin-frontend.vercel.app/

Please, suggest a solution that would allow to pass markdown as a prop directly, without a need of creating extra const with markdown inside of it. 🙏

1 Reply

Avatar
Glaucous-winged GullOP
Issue "not able to pass markdown as props with indentation" was solved here: https://github.com/probablyup/markdown-to-jsx/issues/521