Best approach to render dynamic content with components and a lot of text/information #9352
Unanswered
irux
asked this question in
Help/Questions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello guys! I am researching for the best practices and ideas on how to render heterogeneous dynamic content with a lot of information and components inside :
Right now I have a website that shows multiple products (SPA). Unfortunately the products can be super different and it brings the problem of having an standard view and not letting to have a component for all the products. Some products have graphs/charts, others only videos, other just text, etc in other word, you have multiple kind of combinations. That's why a component that render everything with an if statetement is not the best solution for us (in my opinion). Moreover we would like to avoid to deploy everytime we have to change something. So I am searching for a way to ask the backend for the information and then render it on the website. The thing is, I would love to have some kind of component that let render markdown and then let me use components inside it. Kind of what mdx (https://mdxjs.com/) is cappable of but I would like to avoid using JSX for this, because we are not using JSX/TSX for the website. MDX is mostly what we want because in that way we would just write files in the DB, request them and render it. Something like this https://882w4v374l.codesandbox.io/ but with a more natural way of writing things (not everything as a json tree more like markdown).
For now things that seems to make the things I want are the one of above or something like vitepress/ https://content.nuxt.com/ (I am not using next, so maybe this wouldn't work for me).
I am not sure if what I am searching is some kind of headless CMS (I have never used one properly) but I think it still wouldn't solve my problem because I searching a way to render it not the information on the back.
Migrate to ssr is for now out of the table, we would like to keep the SPA architecture. I know this could make things more harder.
Moreover I know some of the possible approaches will have some risks like xss and so, but that's why I wanted to ask here the opinion and see what kind of possibilities could work for us :)
Sorry if I am a little bit lost, but that' s why I wanted to ask you guys here
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions