-
-
Notifications
You must be signed in to change notification settings - Fork 929
[rewrite] Piecemeal usage #1132
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I think that |
@hugufc I'm not sure how useful the router is without Mithril itself. The routing is inherently coupled mainly because of the API itself, and there's hardly a use case. It's simple enough you could adapt it to something else, though (and it could be done within a few hours max unless you all have very testing requirements comparable to NASA's). |
update: I merged @sebastiansandqvist's PR as a starting point for this and made a few changes Currently, these piecemeal modules exist:
Caveat: the last two (render and redraw) expose their parent objects and not the methods themselves, so consider them work in progress. The reason I haven't exposed those two properly has to do w/ some issues in bundler that I need to fix... I haven't aliased |
With the current state of things, I'd consider this done. |
There have been multiple calls for mithril to be made more modular, and I think there's some value in that. With the way the
rewrite
branch has been structured that's now possible, so here's an approach at defining how you might actually use just certain pieces of mithril.This continues from the previous discussion in #1044 (comment)
This complicates manual redrawing some since
m.redraw()
won't just be stuck onm
for users doing the piecemeal requires, but that can probably be another module that can be grabbed if necessary.The text was updated successfully, but these errors were encountered: