Fork me on GitHub
David Pham06:07:59

Did you export your components?

Gleb Posobin16:07:17

Any idea why a component may not be updating in a firefox extension content script? Basically doing

(def test-atom (r/atom {}))
(defn test-comp [] [:div "Test " (:text @test-atom)])
(defn init []
  (let [el (. js/document createElement "div")]
    (rdom/render [test-comp] el)
    (.. js/document -body (appendChild el))
    (swap! test-atom assoc :text "works"))))
in the extension's content script produces a div with "Test", not "Test works". It works in chrome but not firefox. The atom is being changed, but test-comp is not being rerendered. Have tried with swapping render and appendChild, same result.

Gleb Posobin17:07:40

After a couple of hours of debugging reagent, discovered that this has been fixed and I have been using an outdated version of reagent facepalm