-
Notifications
You must be signed in to change notification settings - Fork 1
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
Vision for client-side routing? #4
Comments
My thinking is to keep Regarding the router, I have been sketching on an idea similar to the router in Choo which works like a import { html, Component } from 'yeet'
import { Router } from 'yeet-router' // or whatever
export default Component(function (state, emit) {
const router = new Router()
router.on('/foo', () => import('./foo.js'))
router.on('/bar', () => html`<div>bar</div>`)
router.on('/baz', () => Component((state) => html`<div>${state.baz}</div>`))
return function () {
return html`
<div id="app">
${router.current}
</div>
`
}
}) |
thanks for the explanation! very cool to know that you're iterating on ideas and personally super excited to see how it materializes. regarding the router, looks solid to me! being able to nest routing is definitely a big plus :) |
Have you had any ideas on how client-side routing would work in yeet? Would it be something that can be implemented in yeet itself or would you defer to some other library/implementation? Would an in-house implementation be similar to how Choo works?
For me, I feel like that's the last missing piece of making yeet something I can be productive with when it comes to building SPAs, so just curious if there were any thoughts on that
The text was updated successfully, but these errors were encountered: