-
Notifications
You must be signed in to change notification settings - Fork 595
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
feature idea: a cleaner start() function #191
Comments
👍 to separating out server functionality. I haven't used it (and don't anticipate needing to) so I don't really know why there's separate mounting logic (why doesn't user just use dom APIs like we do in client). Also it looks like On a separate note, there are some app options that have to be passed to |
#192 would lay out the groundwork for this; in a major version we could deprecate all options passed to |
Hm, I think if we could |
closing as it's staged on v4 already |
Right now we've got this weird behavior in
start()
that the API to append to something rendered on the server is different when running it from root. Internally this means there's a whole bunch ofif
statements that make the code look less than ideal:And in addition the API can be two things:
Now I'm not a fan of this. I'm glad we put it in there to make it at least possible to render on the server, but looking back I think we can create a better API. I'm not a fan of passing in arguments that change the return type, which in turn also must be wrapped in order to export. The upgrade doesn't feel intuitive. It's too many things changing in different directions I feel. With eyes on the upgrade curve (or smooth learning curve, w/e) I reckon this might be a nicer solution:
The differences with this might not seem like a lot, but it plays further into the narrative of "removing magic" and only using native DOM methods. I think it would make the code clearer and better communicate intent (answering the important "why" for why the API is the way it is). Internally it also helps the implementation by not bundling bytes unless absolutely necessary:
Because we're changing the API this would definitely be a breaking change. But I wanted to hear your opinions on this - what do you all think?
The text was updated successfully, but these errors were encountered: