This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-09-05
Channels
- # 100-days-of-code (1)
- # announcements (9)
- # aws (1)
- # beginners (195)
- # braveandtrue (60)
- # calva (3)
- # cider (36)
- # cljs-dev (3)
- # clojure (124)
- # clojure-canada (13)
- # clojure-dev (18)
- # clojure-germany (2)
- # clojure-italy (2)
- # clojure-losangeles (1)
- # clojure-nl (9)
- # clojure-russia (1)
- # clojure-spec (20)
- # clojure-uk (109)
- # clojurescript (49)
- # core-logic (29)
- # cursive (7)
- # datomic (62)
- # defnpodcast (1)
- # devcards (11)
- # docker (3)
- # duct (6)
- # figwheel (13)
- # figwheel-main (57)
- # fulcro (2)
- # graphql (11)
- # hyperfiddle (3)
- # jobs (5)
- # jobs-discuss (9)
- # leiningen (2)
- # lumo (1)
- # off-topic (12)
- # onyx (2)
- # pedestal (1)
- # portkey (2)
- # rdf (1)
- # re-frame (39)
- # reitit (13)
- # remote-jobs (2)
- # rum (5)
- # shadow-cljs (82)
- # tools-deps (48)
- # unrepl (3)
- # vim (12)
- # yada (1)
@joshua.d.horwitz I'm not sure you have this right
You equate re-frame's event handling
with redux's creating actions
.
But, as I understand redux (admittedly not much), that doesn't seem right.
re-frame really doesn't involve actions, you just dispatch a vector like [:something a b]
event handling (Domino 2) is morethe equivalent of reducers in redux
AIUI, redux doesn't really have an equivalent to effect handlers.
Hmm. So really reducers is BOTH effect handlers and event handlers. Or something.
Essentially, I can go through the article again and I will try to clarify and make it map more clearly. Thanks for reading and the feedback @mikethompson
@andrea.crotti @henrik @samueldev What fantastic timing on the question about multiple SPAs in given project — I ended up doing multiple build targets, but I’m dissatisfied with that, because I have to remember to set up multiple figwheel builds, and CircleCI and Heroku takes 2x as long now to do the production builds. (8-9 mins feels so much slower than 4m)
I’d love to figure out how to do it in one build, but I couldn’t get the :on-jsload
to work for more than one.
The modern-cljs tutorial suggests this can be done (they used /login and /shopping-card as an example), but I couldn’t figure out how to get it to work. (They used boot, I use lein.)
Do you know of any examples of how to get re-frame to work with multiple SPAs?
PS: @mikethompson: I say I’m “dissatisfied” above, but in actuality, I’m delighted beyond words with re-frame and that I have something working at all! The fact that I could share events, subs, and db, and just rewrite the core and views blows my mind.
Thanks for all your great work, @bhauman! I read your amazing announcement (and the kudos from David Nolan <-- congrats on that notable achievement. 🙂 (Studying this link again, seeing if the lightbulb flickers on this time. Stand by. :)
@bhauman I will write up an example when I finally get this to work, because I think a lot of other people may find it helpful.
Okay, you can see the horribleness I did to create the new cljsbuild
targets of iphone-dev
and iphone-min
here (the original SPA targets were just “dev” and “min”): https://gist.github.com/realgenekim/441c931ca7e8dc75ccc716aee24cde67
Your instructions are:
- copy the old build dev build target: (:output-to “app.js”). So, copy it to “iphone.js”
- I have a new “iphone.html” that loads the “iphone.js”
- in what file do I a require
the new “src/trello_iphone/core.cljs”?
Thanks much, Bruce!
@genekim you would require the what you would normally put in :main
for the other build
Yes! Totally! That was actually the first thing I tried, but of course, before “extra-mains”, that totally did not work as expected. 🙂 I’ll try it out tonight, and I’ll post a minimal example. Thanks again, @bhauman
you have to munge the namespace and you have to make sure you are watching all the files
PS: that is super, super cool. Just curious: for most people, how would you rate the effort of migrating from figwheel to figwheel.main? (e.g., minutes, hours, days, weeks? :)
if you are not using to many features of lein figwheel I’d say an hour and a half, and that’s simply because you will need to understand how it works. so its mostly going to be time spent reading docs.
I'm thinking about the architecture of my SPA (to decouple my Business Rules) and I saw the suggested app structure here https://github.com/Day8/re-frame/blob/master/docs/Basic-App-Structure.md. I'm wondering if it makes sense to have the Business Rules as one of the Panels in the suggested structure.