lilactown / helix

A simple, easy to use library for React development in ClojureScript.
Eclipse Public License 2.0
631 stars 52 forks source link

Editing transitive dependencies doesn't trigger a refresh #31

Closed lilactown closed 4 years ago

lilactown commented 4 years ago

When testing with web, transitive namespaces do not trigger a refresh. Example:

(ns app.a
  (:require
   [app.b]
   [helix.core :refer [defnc]])

(defnc app
  []
  (app.b/greet "Refresh"))
(ns app.b
  (:require 
   [app.c]))

(defn greet
  [name]
  (str app.c/greeting ", " name "!"))
(ns app.c)

(def greeting "Bonjour")

Editing app.c/greeting to "Hello" will not trigger app.a/app to refresh.

I'm not sure if this behavior is different in React Native; it is dependent on whether app.a gets reloaded when transitive namespaces are edited. shadow-cljs on the web currently only reloads namespaces that directly depend on the edited namespace.

lilactown commented 4 years ago

I believe this is solved in shadow-cljs by using :reload-strategy :full