@levitanong I hadn't thought of situations without javascript. I suppose SSR only should be supported, so hrefs make sense.
Though I guess my forms should be setup for situations without javascript too. 😕
Fwiw, i use hrefs and pushy.
That's what I've got now as well.
And bidi routes. Though every once in a while I'll throw in an incorrect href and it'll actually try to go to that page, which is a pain.
I don't have SSR yet.
@ghopper and @danielstockton i used to use pushy, but it did some weird things when dealing with xlink:href
s. This is when you’re trying to use SVG symbols.
@levitanong you can fix that with a bit of css pointer-events: none
I use a lot of SVG icons for links and had the same issue.
You just have to make sure the css is targeted, so you don't mess with events for charts etc... that may also use svg.
@danielstockton oh I didn’t know that! Thanks for the tip.
So if I have a :onSubmit #(.preventDefault %)
on a form, then when javascript is disabled, it'll actually post?
:onSubmit is a React event-handler and relies on js too
So when javascript isn't around it won't prevent it, right?
@ghopper afaik you would need to fill out the action
attribute if you wanted it to work without javascript.
also, the method
Oh yeah, sorry, I was saying if the form was formatted as a valid post form.
So I could make all forms be valid forms, but then stop them from actually posting and do om stuff instead.
I believe so! that’s exactly what pushy does under the hood.
Yeah, then combining that with pushy and hrefs and SSR, I should have my app act as either a SPA or multiple pages.
You've got your work cut out.