mithril-vndb/docs
Isiah Meadows 582bda56dc
Partially recast the router API to be a lot more intuitive. (#2469)
* Recast the router API to be a lot more intuitive.

Fixes #2387
Fixes #2072
Fixes quite a few issues reported on Gitter.

For `m.route.Link`:

- More intuitive
- More accessible
- More ergonomic
- It can be disabled
- It can be cancelled
- It can be changed
- Oh, and you can use it isomorphically.

For `m.route.prefix`

- You can *read* it.
- You can write to it, of course.
- It's literally just setting a property.

For the router itself (and the rest of Mithril):

- You can now `require("mithril")` and all its submodules without a DOM
  at all. There is a catch: you can't instantiate any routes, you can't
  mount anything, and you can't invoke `m.render` in any capacity. You
  can only use `m.route.Link`, `m.route.prefix`, hyperscript stuff, and
  `mithril/stream`, and you can use `m.request` with `background: true`
  if you use a global XHR polyfill. (You can't use `m.request` without
  `background: true` except with a DOM to redraw with.) The goal here is
  to try to get out of the way for simple testing and to defer the
  inevitable `TypeError`s for the relevant DOM methods to runtime.

  The factory requires no arguments, and in terms of globals, you can
  just figure out based on what errors are thrown what globals to
  define. Their values don't matter - they just need to be set to
  *something*, even if it's just `null` or `undefined`, before Mithril
  executes.

Had to make quite a few other changes throughout the docs and tests to
update them accordingly. Oh, and that massive router overhaul enabled me
to do all this.

Also, slip in a few drive-by fixes to the mocks so they're a little
easier to work with and can accept more URLs. This was required for a
few of the tests.

* Update changelog + numbers, add forgotten bundle option

* Add PR numbers to changelog [skip ci]

* Allow continuing to the next match by returning `false`.

* Update numbers again
2019-07-12 15:29:37 -04:00
..
animation.md Corrected the case issue of 'JavaScript' throughout the docs (#2401) 2019-04-01 08:14:38 -04:00
api.md Partially recast the router API to be a lot more intuitive. (#2469) 2019-07-12 15:29:37 -04:00
autoredraw.md Partially recast the router API to be a lot more intuitive. (#2469) 2019-07-12 15:29:37 -04:00
buildPathname.md Streamline route/request path handling and split params + body in requests (#2361) 2019-05-29 09:28:40 -04:00
buildQueryString.md update docs, add descriptions for api methods 2016-12-02 17:51:07 -05:00
change-log.md Partially recast the router API to be a lot more intuitive. (#2469) 2019-07-12 15:29:37 -04:00
CNAME Docs auto-push to gh-pages branch 2017-03-07 22:07:55 -08:00
code-of-conduct.md docs: update with latest fixes (#2116) 2018-04-12 00:11:11 -07:00
components.md Corrected the case issue of 'JavaScript' throughout the docs (#2401) 2019-04-01 08:14:38 -04:00
contributing.md Corrected the case issue of 'JavaScript' throughout the docs (#2401) 2019-04-01 08:14:38 -04:00
credits.md #1609 fix lifecycle hooks in children of recycled keyed vnode 2017-02-09 08:31:08 -05:00
css.md docs: update with latest fixes (#2116) 2018-04-12 00:11:11 -07:00
es6.md Correct a bunch of incorrect/outdated references (#2457) 2019-07-06 03:41:01 -04:00
examples.md adding stephen hoyers how-to-mithril 2018-09-19 16:38:11 -04:00
favicon.ico docs: Add favicon (#1839) 2017-05-02 09:34:13 -07:00
favicon.png docs: Add favicon (#1839) 2017-05-02 09:34:13 -07:00
fragment.md Corrected the case issue of 'JavaScript' throughout the docs (#2401) 2019-04-01 08:14:38 -04:00
framework-comparison.md Mithril's grown a bit (#2454) 2019-07-05 18:55:45 -04:00
generate.js docs: update with latest fixes (#2116) 2018-04-12 00:11:11 -07:00
hyperscript.md Partially recast the router API to be a lot more intuitive. (#2469) 2019-07-12 15:29:37 -04:00
index.md Partially recast the router API to be a lot more intuitive. (#2469) 2019-07-12 15:29:37 -04:00
installation.md Correct a bunch of incorrect/outdated references (#2457) 2019-07-06 03:41:01 -04:00
integrating-libs.md fix small typos (#2409) 2019-04-27 20:47:44 -04:00
jsonp.md Fix for #2423. request.data => body, params is used for querystrings (#2425) 2019-06-10 19:36:32 -04:00
jsx.md Correct a bunch of incorrect/outdated references (#2457) 2019-07-06 03:41:01 -04:00
keys.md Keys docs indent fix, additional edits for clarity (#2459) 2019-07-10 07:35:56 -04:00
layout.html docs: update with latest fixes (#2116) 2018-04-12 00:11:11 -07:00
learning-mithril.md docs: latest site updates (#2126) 2018-04-20 08:36:08 -07:00
lifecycle-methods.md Docs - prioritize closure components for state (#2292) 2018-11-13 01:04:04 -05:00
lint.js Officially drop IE9-10 support, pull out our hacks (#2296) 2018-11-27 18:04:15 -05:00
logo.svg prep docs 2017-01-30 10:43:22 -05:00
mount.md Deservicify core (#2458) 2019-07-07 18:28:43 -04:00
nav-guides.md Streamline route/request path handling and split params + body in requests (#2361) 2019-05-29 09:28:40 -04:00
nav-methods.md Drop m.version (#2466) 2019-07-10 14:04:44 -04:00
parsePathname.md Clarify pathname docs, follow spec with fragments (#2448) 2019-07-03 06:22:25 -04:00
parseQueryString.md Clarify pathname docs, follow spec with fragments (#2448) 2019-07-03 06:22:25 -04:00
paths.md Clarify need for escaping, to avoid confusion (#2456) 2019-07-06 02:45:12 -04:00
promise.md Fix for #2423. request.data => body, params is used for querystrings (#2425) 2019-06-10 19:36:32 -04:00
redraw.md Officially drop IE9-10 support, pull out our hacks (#2296) 2018-11-27 18:04:15 -05:00
releasing.md s/mithril/mithril@next/g, add v1 docs link [skip ci] (#2368) 2019-02-02 11:01:51 -05:00
render.md Deservicify core (#2458) 2019-07-07 18:28:43 -04:00
request.md Track XHR replacements correctly (#2455) 2019-07-05 19:50:51 -04:00
route.md Partially recast the router API to be a lot more intuitive. (#2469) 2019-07-12 15:29:37 -04:00
signatures.md Partially recast the router API to be a lot more intuitive. (#2469) 2019-07-12 15:29:37 -04:00
simple-application.md Partially recast the router API to be a lot more intuitive. (#2469) 2019-07-12 15:29:37 -04:00
stream.md standardize cdn links in docs (#2416) 2019-05-27 11:58:11 -04:00
style.css Adding fallback font-family sans-serif (#2411) 2019-05-14 13:52:56 -04:00
support.md docs: latest site updates (#2126) 2018-04-20 08:36:08 -07:00
testing.md Corrected the case issue of 'JavaScript' throughout the docs (#2401) 2019-04-01 08:14:38 -04:00
trust.md Corrected the case issue of 'JavaScript' throughout the docs (#2401) 2019-04-01 08:14:38 -04:00
vnodes.md Corrected the case issue of 'JavaScript' throughout the docs (#2401) 2019-04-01 08:14:38 -04:00