DEV Community

Discussion on: Vecty with Vue.js style templating

progrium profile image
Jeff Lindsay Author

Oh, yes. Actually a project that does JSX style Go exists (and uses .gox), but the reason I don't like this is that it's more complex and will pollute your files with .go and .gox files. This might be acceptable for JavaScript project, but I don't find it acceptable. What's more common in Go is to have separate template files, and that's easy to do here.

With Vecty if the HTML for a component is simple enough to not warrant a separate file then you can use the functional builder API that it currently comes with.

Thread Thread
norunners profile image
norunners

Check out vueg which uses go generate to achieve this.
github.com/norunners/vueg