You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Seed looks for <base> element in <head> and eventually sets base url for its router according to base's href. (Base for routing #369)
Seed tries to hydrate / overtake HTML in its mount point / root element. If it's not possible, fallbacks to render / append. (Mount takeover behavior concerns. #277)
PubSub API was introduced in this PR. It makes routes, window_events, sink and GMsg redundant. So it's a good time to revisit and improve App builder API.
Builder API is too complex:
I don't remember all function signatures so I have to often copy-paste them from app_builder example.
We need a dedicated example (app_builder) for it to demonstrate all options.
I often forget to "register" some functions in the builder and then I'm surprised that my app doesn't work.
There are many implicit options, Seed-specific names and calls, probably confusing for beginners - UrlHandling, MountType, Model::default (if it's possible), BeforeMount, AfterMount, sink..
I don't know why I should want to use url in BeforeMount.
BeforeMount and AfterMount can be confusing - I would think that it means Before mounting to DOM and After mounting to DOM - which is not true because it hasn't been rendered yet. Also it deviates from standard Elm architecture and doesn't make sense in submodules context.
Implementation notes
Remove comment at UrlChange - /// - Url change is fired also on application start by default.
The text was updated successfully, but these errors were encountered:
Proposed changes (1st draft):
Replace
App::builder
with:"app"
implementsMountPoint
/RootEl
.update
andview
without changes.init
example:New behavior:
<base>
element in<head>
and eventually sets base url for its router according tobase
'shref
. (Base for routing #369)hydrate
/overtake
HTML in its mount point / root element. If it's not possible, fallbacks torender
/append
. (Mount takeover behavior concerns. #277)UrlHandling::PassToRoutes
by:Motivation
routes
,window_events
,sink
andGMsg
redundant. So it's a good time to revisit and improve App builder API.app_builder
) for it to demonstrate all options.Default
for yourModel
(Improve error message when Model doesn't implement Default #376).UrlHandling
,MountType
,Model::default
(if it's possible),BeforeMount
,AfterMount
,sink
..url
inBeforeMount
.BeforeMount
andAfterMount
can be confusing - I would think that it meansBefore mounting to DOM
andAfter mounting to DOM
- which is not true because it hasn't been rendered yet. Also it deviates from standard Elm architecture and doesn't make sense in submodules context.Implementation notes
UrlChange
-/// - Url change is fired also on application start by default.
The text was updated successfully, but these errors were encountered: