gordonbrander / spellcaster

Reactive signals UI library
MIT License
57 stars 2 forks source link

WIP proposal: Router #22

Closed gordonbrander closed 7 months ago

gordonbrander commented 9 months ago

This PR explores adding a minimal history-API-based router, intended to be used in tandem with store.

TODO

Prior art

DSL bikeshedding

Express style?

const router = Router()

router.route(`api/object/:id`, request => {
  // Do something... send message to store, replace root element, etc.
})

const unlisten = router.listen()