Fork me on GitHub
#helix
<
2022-09-11
>
Soe H08:09:06

Hi, I need a pointer on how to use reitit and helix. What is the equivalent of this https://github.com/metosin/reitit/blob/master/examples/frontend/src/frontend/core.cljs example with helix?

lilactown16:09:20

you can store the match state either in a local component state at the top of your app and pass it down, or in an atom and use a hook to reference it's state with useSyncExternalStore

lilactown16:09:38

there's not a super easy way to access global state like this with helix out of the box

lilactown16:09:01

I would highly encourage you to use something like react-router anyways, since it's going to give a much better developer and user experience

thanks3 1
Soe H16:09:21

Thank you, I think I will follow your recommendation and just learn to use react-router.

dvingo17:12:50

@U03PB0E914Y did you end up getting react router integration working? I was trying to use react router v6 and it's quite annoying. I am moving to the approach in this example: https://github.com/rafaeldelboni/helix-refx-reitit-example