Make composition more natural in syntax and closer to XML, HTML and JSX #243
Nefcanto
started this conversation in
Proposals For Qwik
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
What is it about?
Syntax of Qwik components and slots
What's the motivation for this proposal?
Let's compare these two code snippets. Both try to render a Tab component, but provide different components for different parts:
Qwik way:
React way:
Svelte way:
Either let's remove the
q:part from the beginning of slots (the Svelte syntax), or let's make passing components as attributes/props possible (the React way).Qwik's current syntax is not developer-friendly when it comes to writing everyday code that seems more natural, such as HTML, JSX, or XML.
Of course, XML namespaces are similar to this. But that can be justified. Qwik can not.
Proposed Solution / Feature
Either let us pass other components as attributes/props (since you are using JSX).
Or,
Drop the
q:from the beginning of it.Links / References
No response
Beta Was this translation helpful? Give feedback.
All reactions