3 ms·
Why include XHR in a view framework?
by tobyhinloopen 8y ago
Why include XHR in a view framework?
- thunderbong 8y agoIt's an MVC framework
- idoubtit 8y agoYou can use mithril.js without m.request, but then you have to dispatch redraw events when you finished handling the request[^1]. It also provides a promise API for web requests in old browsers, i.e. without fetch(). If I choose not to use m.request, I would have to find another XMLHttpRequest wrapper and bind it to Mithril. [^1]: https://mithril.js.org/autoredraw.html#after-mrequest https://mithril.js.org/autoredraw.html#after-mrequest
- cmx66 8y agoIt's a library for building webapps. Router and Ajax lib are a pretty obvious requirement for every webapp.