-
Notifications
You must be signed in to change notification settings - Fork 546
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
JSX like syntax #1770
Labels
Comments
also there well known js framework Astro written on go has their own file format |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Proposal
You know that jsx format made revolution in js world. Now jsx is must have in any js parser by default. Here good video about how jsx help think differently https://www.youtube.com/watch?v=Y12sGu8-qFE
Just a reminder that jsx is just a sugar for function call
is equal to
name of
someFunc
and from where it's imported usually configurableanother example with components
I think this syntax can be easily transformed to go
I think jsx in go+ can be really good boost to use it for many users
Background
I just started using go and I found out that there no component based template engine for web frameworks.
I'v created one by my self https://github.com/redexp/express-engine-jsx
For example jsx template file could look like this
which will first transform with help of one plugin to
and then to native js code
Workarounds
I found many packages that trying to mimic jsx https://pkg.go.dev/search?q=jsx
The text was updated successfully, but these errors were encountered: