Fork me on GitHub
#fulcro
<
2022-10-20
>
Eric Dvorsak16:10:52

it seems like fulcro rad history made the choice to not use hashed URLs, has anyone managed to tweak it to work with it? I tried adding a "#" route-segment to my root component but unfortunately it doesn't work, using the code here for instance https://github.com/fulcrologic/fulcro/blob/master/src/workspaces/com/fulcrologic/fulcro/cards/nested_dynamic_routing_tree_cards.cljs I get

timbre_support.cljs:80 ERROR [com.fulcrologic.fulcro.routing.dynamic-routing:684] -  Could not find route targets for new-route ["#" "a" "a2"] See 

Eric Dvorsak16:10:49

(the main motivation for hashed URL being that the browser will ignore them and won't hit the server / the server doesn't have to support the various endpoints)

Eric Dvorsak16:10:33

ok I found out that it can actually configured as an argument to html5 history

Eric Dvorsak16:10:10

I dont like though that there is a random param in between the root and the hashbased part http://localhost:3000/?_rp_=WyJeICJd&amp;#/a

sheluchin17:10:19

https://clojurians.slack.com/archives/C68M60S4F/p1637772708389800?thread_ts=1637765422.389000 That's just an empty map, but yeah, would be nice if it didn't show that.

Eric Dvorsak17:10:58

yeah I figured it wasn't random but there is two oddities with it: • it appears before the hashed URL instead of after • it contains params that are already URL encoded, for instance if the URL is #/person/3 , 3 being person-id, it will be encoded again in this _rp_ URL param

Eric Dvorsak18:10:16

I'm wondering what the rationale is for this _`_rc_`_ stuff instead of regular query-params (and not mixing them with path params)