Open thednp opened 2 years ago
This project is used to provide the JSX compiler and the runtime to support it to build a framework on top of it with the fine-grained reactivity library of your choice. Solid's core rendering is done this way. But this wouldn't support something like React which has a different update model.
I think you are asking if we do JSON -> JSX (or maybe to DOM)? It is not one of the transforms we have. It is interesting thing that maybe we could consider if we had native compiler support for what I refer to as <Dynamic>
in Solid. But generally speaking since this library is agnostic the framework built on it will have its own features so we try to leave that outside. JSX has very clear syntax so its is easy to transform where as JSON would probably require some sort of wrapper markers to know where it starts and need to follow a very specific pattern to be as analyzable.
What I've seen to date here has mostly been runtime process where one iterates over a JSON blob and creates components in JSX on the fly. But other than like our MDX libraries in the ecosystem I haven't seen published libs that do that and not in a generic way.
I know about Solid, I watch your every stream and test almost every release ;P
I guess what I'm trying to figure out is how Builder and qwik work, where JSON is a big part of the entire thing, on top of that there is a small possibility to connect with GraphQL and MongoDB into an unified JSON defined component + middleware + db, an idea that fascinates me a lot. In short, imagine defining something into a products.JSON => graphql (definitions, queries and mutations), MongoDB queries, typed Solid/React/Svelte store + components, bio-digital jazz, man.
In your Marko stream, didn't you guys use Marko to generate Solid functional components? I think that's when my mind exploded with ideas.
Thanks Ryan, I hope to see you live on Friday :)
Seems like this issue can be closed or moved to discussions
Is there a way we can define JSON properties and generate Solid/React components with this library?
Thanks