helix

Soe H 2022-09-11T08:17:06.536019Z

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?

lilactown 2022-09-11T16:49:20.000729Z

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

lilactown 2022-09-11T16:49:38.298019Z

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

lilactown 2022-09-11T16:50:01.282899Z

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

1
dvingo 2022-12-23T17:48:50.279839Z

@soelaces 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

Soe H 2022-09-12T16:02:21.777669Z

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