re-frame

https://github.com/Day8/re-frame/blob/master/docs/README.md https://github.com/Day8/re-frame/blob/master/docs/External-Resources.md
2020-12-11T05:39:36.430700Z

I know this is late, but if you can send transit (edn) instead of json this is a non-issue. I also ran into this issue and switching to transit Just Worked

p-himik 2020-12-11T07:33:18.430900Z

The above code has nothing to do with JSON. It's just how query parameters work. Of course you could use just a single parameter and pass it the whole transit string but it has downsides on its own.

Felipe Marques 2020-12-11T15:20:00.431900Z

Hi guys, I was wondering if it would be ok to create a subscription like this:

(reg-sub
  :visible-todos

  ;; signal function - returns a vector of two input signals
  (fn [todos-source-sub _]
    [(subscribe todos-source-sub)
     (subscribe [:showing])])

  ;; the computation function - 1st arg is a 2-vector of values
  (fn [[todos showing] _]
    (let [filter-fn (case showing
                      :active (complement :done)
                      :done   :done
                      :all    identity)]
      (filter filter-fn todos))))

Felipe Marques 2020-12-11T15:20:51.432900Z

The basic idea is passing another subscription spec (like [::my-personal-todos]) as a query param to define the input-signal for the subscription

p-himik 2020-12-11T15:23:05.433Z

LGTM But I bet not everyone will agree.