Fork me on GitHub
#hyperfiddle
<
2022-08-29
>
Adrian Smith13:08:36

I’m thinking about adding different pages to my webapp, to be more like a website (true server side page navigations), back buttons work etc, I’m thinking of finding the jetty router and start hacking until I have a couple of pages that all render photon apps Is this the correct mental model for implementing new pages?

Dustin Getz14:08:52

We will provide in ~October an optional hybrid HTML5/http router with both server page entry point and fast local nav. Hyperfiddle-2020 has this already, it needs to be ported and modernized

❤️ 1
Dustin Getz14:08:15

For now you can do what you want but I'd recommend starting as a SPA with HTML5 pushstate api, and then we can layer in the server http support later. So that means your route is an atom on the client which is synchronized with the browser history, and photon can watch the atom and dispatch on route from there

👍 1
Dustin Getz15:08:55

We may accelerate router work actually as everyone needs it- I will talk to the team

Dustin Getz15:08:41

Ok, html5 router is at least a month out for us. Would you like to contribute a simple one?

Adrian Smith13:09:14

How did the original router work? :thinking_face:

Dustin Getz13:09:33

We used a forked pushy on the client side, it needed to be rewritten, hopefully there is better foss spa router (edit: HTM5 integration really) available for cljs now

Dustin Getz13:09:18

we used that to synchronize the browser document.location to an atom