Currently plugins can only extend the following app's options:
Should plugins also allow extending view and plugins?
Plugins wouldn't really make sense. View is possible through the onRender hook.
What about extending the view?
@jbucaran
view is possible through the
onRenderhook.
What else do you mean? Extracting SVG?
I meant allowing plugins to export a view prop.
But, you're right, let's _not_.
What about plugins that need UI?
An example would be a plugin that integrates hyperapp updates with https://github.com/mrdoob/stats.js/ or a debugger that includes its own UI.
These plugins could essentially have their own mounting-point, view, etc.. They'd be just like any hyperapp app.
This would also make your idea of app({}, router, stats, logger) a reality. The thing I said about this syntax implying that multiple apps are supported — I actually start to think that it makes sense.
What do you think?
@dodekeract You can create two separate apps using app and embed them in sibling containers of a single parent.
@jbucaran I'm aware of that.
Awesome! 👍
I only recently discovered that you can have more than one hyperapp on the page at one time!? See here for example. Is this just happenstance or was there some intention behind it?
I'd like to say there was a master plan behind it, but no. I use this to visually test each version also. I have one page with every single example I've created for hyperapp to date. It used to take me 5 seconds to see everything was running smoothly, now it takes me like a minute.
So, in your own words, happenstance, but it's quite obvious once you see that app can be called multiple times.