This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-10-08
Channels
- # beginners (42)
- # boot (1)
- # cljs-dev (36)
- # clojure (24)
- # clojure-berlin (1)
- # clojure-greece (3)
- # clojure-italy (18)
- # clojure-russia (67)
- # clojure-spec (1)
- # clojure-uk (35)
- # clojurescript (30)
- # cursive (2)
- # data-science (2)
- # datomic (2)
- # emacs (6)
- # fulcro (1)
- # garden (1)
- # hoplon (8)
- # lumo (9)
- # off-topic (47)
- # onyx (6)
- # perun (2)
- # protorepl (5)
- # re-frame (10)
- # reagent (1)
- # shadow-cljs (19)
- # uncomplicate (140)
(ns reel.comp.container
(:require-macros [respo.macros :refer [defcomp <> div span]])
(:require [hsl.core :refer [hsl]]
[respo-ui.style :as ui]
[respo.core :refer [create-comp]]
[respo.comp.space :refer [=<]]
[reel.comp.reel :refer [comp-reel]]
[reel.comp.todolist :refer [comp-todolist]]))
no change in records.cljs
can affect code in container.cljs
, so it doesn’t need to be reloaded
I ran into a situation that I want to detect if a component and pure function are changed after HMR,
I was doing that by comparing the references. Since they may not change, my code does not work sometimes.
not sure, I would usually recommend to use the :before-load
:after-load
functions and avoid global state
I knew comparing the references is too tricky. I was trying to reduce some unnecessary recalculations.
Alrighty. I’ve updated http://www.github.com/mhuebert/shadow-eval to 2.0.8, added a :bootstrap
build.
It compiles, but the last example that I had working in 2.0.7 now throws an error when I try to use the macros that I’ve required/referred in the namespace: Cannot read property 'findInternedVar' of null at line 4 \", :data {:file nil, :line 4, :column 1, :tag :cljs/analysis-error}, :cause #object[TypeError TypeError: Cannot read property 'findInternedVar' of null]
Other expressions, like circle
and the for
macro, work as expected.
Update: if I (require-macros '[cells.cell])
, then the other expressions work. Maybe the :load-on-init
namespaces aren’t loading their dependencies? (or macro dependencies?) I have shadow-eval.user
in :load-on-init
.
I also made another attempt at a bootstrap build w/ maria, and got stuck on The required namespace "cljs.env.macros" is not available, it was required by "cljs/js$macros.cljc".
error in compile. I have tried adding cljs.js
and cljs.js$macros
and cljs.env.macros
and cljs.env.macros$macros
to an :exclude
option in the build, didn’t seem to make a difference. I can also replicate this in shadow-eval
.