This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-08-03
Channels
- # admin-announcements (2)
- # arachne (1)
- # architecture (6)
- # boot (316)
- # cider (7)
- # cljsrn (7)
- # clojure (169)
- # clojure-argentina (3)
- # clojure-belgium (1)
- # clojure-canada (4)
- # clojure-india (1)
- # clojure-russia (39)
- # clojure-spec (27)
- # clojure-uk (55)
- # clojurescript (213)
- # css (1)
- # cursive (20)
- # datavis (2)
- # datomic (52)
- # devcards (3)
- # dirac (78)
- # emacs (20)
- # events (1)
- # funcool (3)
- # hoplon (15)
- # jobs-rus (2)
- # om (57)
- # onyx (82)
- # overtone (1)
- # re-frame (10)
- # reagent (1)
- # ring-swagger (46)
- # spacemacs (7)
- # specter (31)
- # spirituality-ethics (1)
- # sql (43)
- # test-check (1)
- # testing (4)
- # untangled (30)
just published Oriens, a Lein / Boot template to scaffold a Compassus application:
https://github.com/compassus/oriens
run boot -d seancorfield/boot-new new -t oriens -n your-app
or lein new oriens your-app
to generate a compassus app from this template
@anmonteiro: if I create a project with lein new oriens your-app
, I only get a boot project - no leiningen project.clj
😟
I meant Boot template because you can run boot -d seancorfield/boot-new new -t oriens -n your-app
Boot is the build tool for the generated project
it’s right there in the README 🙂
I’m not going to spend any time working on a Lein setup for the generated project, sorry
nope, boot-reload
does the same thing
and is composable with other Boot tasks
@akiel: sure, PR welcome
@anmonteiro: if I use defonce on the state, I get the same error in your project as I get in mine. The problem is in reconcile!
line 1787 in alpha41. The line is ((:render st))
and the problem is that (:render st)
is nil
. Can you see the same?
@akiel: definitely not seeing that
@anmonteiro: I do the following: lein new oriens my-app, boot dev, change something - in chrome console I see Reload and set-route! messages, change def to defonce - in chrome console I see the following...
@akiel: yeah, hitting that too, I know why
problem is app
also needs to be defonce
d
@anmonteiro: yes I also noticed that a defonce on app works, but than you can’t reload routes and other things
@akiel: should be fixed now, try lein new oriens my-app
🙂
hrm, you might need to delete your local cache though
not sure, just check if it downloads a new one
@anmonteiro: ok works for me - I’ll try this in my project
glad to hear
Put another way: Does anyone know what objects can be used as React keys? Or, more accurately, what React's notion of key equality is?
@peeja: I think it’s triple-equals equality, so numbers, strings
@anmonteiro: in your solution: init! would not be called in production, I have solved it a bit differently: I prevented reloading of the core namespace, renamed init! into reload! and only do the forceUpdate there
@akiel: init!
can be called in production, reloading will never happen
so it just ends up being called once
you need to call it for your app to be set up
yeah, just need to ^:export
it
@akiel: you can either make everything non-reloadable, and just have the app mount everytime you reload, or make everything reloadable for that workflow to actually work
¯\(ツ)/¯
@anmonteiro: why doesn’t work a forceUpdate
on your root component? I tried it. Would be simpler.
@akiel: since props haven’t changed, the shouldComponentUpdate
call would fail on the children
I mean, not fail, but return false
no, that’s exactly the point
but if I change something in a subcomponent of a routable component - the forceUpdate also works
might be
@akiel: for development purposes you can just use a react-key like (system-time)
or something
and put that in props
that’s guaranteed to change
only way I know is using the production React