helix

tianshu 2023-07-24T20:21:44.859579Z

Hey, new to helix. How do you guys configure your editor to indent the code properly? I'm using Emacs

hifumi123 2023-07-24T20:25:36.867949Z

CIDER had a bug where indent metadata in ClojureScript macros wasn’t being respected. It should be fixed as of https://github.com/clojure-emacs/cider-nrepl/pull/785

tianshu 2023-07-24T20:30:38.371379Z

Hmmm, I see.

tianshu 2023-07-24T20:50:08.282339Z

Which route library is preferred to use with? reitit or react-router?

hifumi123 2023-07-24T21:01:51.126139Z

You can use whichever you prefer. I use reitit, but I have heard of people using react-router as well

hifumi123 2023-07-24T21:05:33.157449Z

e.g. if you want to use react-router, you can use it like this

(ns 
  (:require [helix.core :refer [$ defnc]]
            ["react-router-dom" :refer [BrowserRouter Route Switch]]))

(defnc app []
  ($ BrowserRouter    
     ($ Switch
        ($ Route {:path "/"} ($ home))
        ($ Route {:path "/:user"} ($ user))
        ($ Route ($ not-found)))))

👍 2
tianshu 2023-07-24T22:28:03.307179Z

Thank you! I just tweaked my reitit setup, and it works