Commit Graph
19 Commits
Author SHA1 Message Date
Jonathan Kelley 9b0244ee5c fix: use ready nodes in more places 2022-12-25 01:37:00 -05:00
Jonathan Kelley 85f6ea0545 feat: expand error boundary concept 2022-12-23 23:59:10 -05:00
Jonathan Kelley df4a1b6c7a chore: finish tweaking context api 2022-12-05 15:30:49 -08:00
Reinis Mazeiks d734dc5b46 Remove argument from use_hook closure (#496)
Also; update docs for said function
2022-07-11 15:50:56 -04:00
Evan Almloff fbf8e13b8d clean up imports 2022-06-25 08:27:10 -05:00
Michael Mroz 078287301d Fix query parsing: the router was silently throwing away queries not prefixed with an extra '?' 2022-04-17 01:51:02 -07:00
Maccesch 1080ffe52d use_route hook can be used outside of Route components 2022-03-13 16:31:33 +00:00
Jonathan Kelley c7627f0b93 fix: tests pass 2022-03-04 13:16:37 -05:00
Jonathan Kelley cc83900334 feat: router crate is polished up 2022-03-04 13:16:37 -05:00
Jonathan Kelley f2979cb12a feat: apply local router changes 2022-03-04 13:16:37 -05:00
Jonathan Kelley babe862739 fix: login example to use proper methods 2022-02-16 14:11:31 -05:00
Jonathan Kelley e24957fc19 feat: enable use_router 2022-01-28 14:38:17 -05:00
Jonathan Kelley 79e09934aa chore: add docs to router UseRouteListener 2022-01-28 12:14:40 -05:00
Jonathan Kelley a21e7d4dd1 fix: use_route should subscribe to changes to the route 2022-01-28 12:00:13 -05:00
Dave Rolsky e06eac1ce5 More WIP router implementation 2022-01-13 12:26:49 -06:00
Dave Rolsky c9408da731 Implement UseRoute segment method
This relies on the RouterService to capture path params when it does path
matching.
2022-01-13 12:21:06 -06:00
Dave Rolsky 3c6142fb9d Commit WIP on router
There are a few different changes in here that probably need to be picked
apart. I'm sure much of this is wrong.

* Fix missing `dyn` that compiler complained about in router.rs

* Make UseRoute store a `Rc<RouterService>` rather than a string so we can get
information out of the router like current location.

* Implement `UseRoute`'s nth_segment and last_segment methods. I changed the
return type to a String because of the above.

* Remove some unused imports in platform/mod.rs and service.rs

* Implement the `use_route` fn. It panics if called outside a Router { } (I
think). I think that makes sense.

* Add a `current_location` method to `RouterService` that returns the current
location. I needed this both for the `UseRoute` implementation and _also_ so I
could get at this in my webapp code. I think having some way to get this will
be useful for others, whether or not this exact API is used. In my case, I
want to compare the current path to the `to` path of a `Link` so I can use a
different class for that `Link` if it is the currently active page.
2022-01-13 12:21:06 -06:00
Jonathan Kelley bd341f5571 fix: tests 2022-01-05 17:30:12 -05:00
Jonathan Kelley cb2782b4bb wip: memoize dom in the prescence of identical components 2022-01-05 00:27:22 -05:00