-
Notifications
You must be signed in to change notification settings - Fork 603
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
Route handler return value #711
Comments
It's in |
Thanks. FWIW, I think the router auto-rendering is an anti-pattern. Everywhere else, one does the rendering manually (see beginner's guide). By returning htmlx in route functions, there is no direct way to attach logic to elements after they are appended. I use MutationObserver to listen for renders, and then make a callback out of the app emitter in my templates. Am I doing it wrong? |
Having automatic rendering on navigation I think is very much the responsibility of a framework such as choo. For reacting to updates and routing on the component level, you'd probably want to use |
Where in the source code does choo handle the return value of route handler functions (the hyperx html)? I see where where the router sets the handler, but I don't see where choo takes that return value and renders it.
The text was updated successfully, but these errors were encountered: