Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[QUESTION] JSON to REAL Solid/React components #177

Open
thednp opened this issue Nov 6, 2022 · 3 comments
Open

[QUESTION] JSON to REAL Solid/React components #177

thednp opened this issue Nov 6, 2022 · 3 comments

Comments

@thednp
Copy link

thednp commented Nov 6, 2022

Is there a way we can define JSON properties and generate Solid/React components with this library?

Thanks

@ryansolid
Copy link
Owner

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.

@thednp
Copy link
Author

thednp commented Nov 8, 2022

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 :)

@orenelbaum
Copy link
Contributor

Seems like this issue can be closed or moved to discussions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants