Fork me on GitHub
#cljsrn
<
2023-02-02
>
Татьяна13:02:35

I’m using Krell, Re-frame 1.3.0, React-Native 0.70.6. What is the best tool to use to track re-frame (database changes, events, subscriptions…)?

thomas14:02:23

Wasn't there a tool for tracking re-frame things? 10x re-frame or something like that....

thomas14:02:39

no idea whether that will wotk with RN though.

hadils21:02:18

For RN I use re-frisk-remote withe krell.

Татьяна08:02:38

@UGNMGFJG3 I looked at re-frisk-remote, I understand correctly that it needs to be added to deps.edn:

re-frisk-remote/re-frisk-remote {:mvn/version "1.6.0"}
Next in core.cljs run re-frisk:
(:require [re-frisk-remote.core :refer [enable-re-frisk-remote!]])

 (enable-re-frisk-remote!)
And run re-frisk remote server using leiningen re-frisk plugin. Into global Leiningen config (~/.lein/profiles.clj) added:
{:user {:plugins [[lein-re-frisk "0.5.10"]]}}
Run:
lein re-frisk
Then run my application. But I don’t see any subscription or database at http://localhost:4567/, just tabs. Need some additional setup?

dima14:02:30

We use re-frisk and it works great. You should also start it. For shadow-cljs command is shadow-cljs run re-frisk-remote.core/start

dima14:02:58

Or start it programatically from clojure with:

(try
    (when-let [start (requiring-resolve 're-frisk-remote.core/start)]
      (start))
    (catch java.io.FileNotFoundException _e))

dima14:02:55

You probably already looked into README https://github.com/flexsurfer/re-frisk#react-native-electron-or-web-applications but i leave it here anyway

Татьяна08:02:19

@U051091NM It turns out that I need to add shadow-cljs to the Krell project to work with re-frisk?

dima09:02:52

@U049BSVQYSF shadow-cljs is not necessary, i just assumed you have it since it's very common to use it to build clojurescript. But re-frisk could be started without shadow-cljs like this: add to deps.edn:

:aliases {:dev {:extra-deps {re-frisk-remote {:mvn/version "1.6.0"}}}}}
create re_frisk.clj
(ns re-frisk
 (:require [re-frisk-remote.core :as re-frisk-remote]))

(re-frisk-remote/start)
run:
clj -R:dev re_frisk.clj
(step 3 from the https://github.com/flexsurfer/re-frisk#react-native-electron-or-web-applications)

Татьяна11:02:19

@U051091NM thanks:slightly_smiling_face:

👍 2