Comments (4)
@JulienLecoq Maybe write up some larger code examples here and show the difference and why your way helps with coding. We wrote lots of Go-App style HTML code and do not see a problem with the current method. What Maxence is pointing out is what I would fear too: You can't see the attributes that way without scrolling down to closing parenthesis and I think this may make it hard to make adjustments to the code. Especially with large structures that are nested multiple levels.
P.S.: You do not have to call body for every HTML tag. There is a lot of code app.Div().Class("....").Text("....")
and similar with other elements.
P.P.S.: Before I saw what Go-App is doing I was following https://www.gomponents.com/ development for some time. Right now I like the Go-App way better. We can read and reason about it very easily in the team too.
from go-app.
Thats mean all the attributes and event handlers are set after the body which feels less readable in my opinion.
from go-app.
Maybe we could keep the Body
method for those who prefer your way but also add "my" way for the others?
But that would introduce two ways of doing basically the same thing, so that's maybe not the best.
from go-app.
But that would introduce two ways of doing basically the same thing, so that's maybe not the best.
You said it all :)
from go-app.
Related Issues (20)
- Support for React? HOT 3
- Global css variables does not get set HOT 3
- New name for go-app? HOT 1
- V10 property update issue HOT 3
- Makes the generated HTML available without having to mount the elements. HOT 2
- Signal based change detection HOT 2
- Render calls before OnMount HOT 1
- debug go-app in nowasm HOT 4
- tiny hamburger on mobile HOT 5
- Hot Reload HOT 2
- Issue Cleanup and Focus for Go-app v10 HOT 1
- Route regex like containing `?param=` is not routing HOT 22
- Help: How do I navigate back? HOT 2
- Example code doesn't compile HOT 2
- goappGetenv is not a function, got undefined HOT 7
- app.ValueOf() panic: ValueOf: invalid value
- Custom HamburgerButton not working in v9
- run in Cloudflare workers HOT 3
- https://go-app.dev updates are lacking latest releases HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from go-app.