This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-07-26
Channels
- # admin-announcements (1)
- # alda (44)
- # aws-lambda (6)
- # beginners (8)
- # boot (187)
- # capetown (5)
- # cider (25)
- # cljs-dev (24)
- # cljsrn (93)
- # clojure (45)
- # clojure-austin (9)
- # clojure-canada (2)
- # clojure-greece (1)
- # clojure-mexico (3)
- # clojure-poland (3)
- # clojure-russia (1)
- # clojure-spec (12)
- # clojure-uk (13)
- # clojurescript (86)
- # cursive (9)
- # datascript (3)
- # datomic (32)
- # defnpodcast (4)
- # devcards (23)
- # editors (3)
- # emacs (5)
- # hoplon (27)
- # immutant (3)
- # lein-figwheel (9)
- # leiningen (4)
- # luminus (10)
- # om (32)
- # onyx (2)
- # other-languages (1)
- # perun (1)
- # protorepl (8)
- # re-frame (13)
- # reagent (2)
- # remote-jobs (2)
- # ring (3)
- # spacemacs (4)
- # spirituality-ethics (3)
- # test-check (16)
- # untangled (65)
- # yada (50)
@pesterhazy: maybe they would take a patch that allows customization of the list of "require" statements, like you can customize the pragma (element builder fn) in JSX to use Preact &c
@martinklepsch: interesting idea!
Why don't they use haste for this part? Just forgot about this part of the default transformer?
@boorad: they seem to be refactoring continuously
it wouldn't surprise me if it got stuck in the middle of a refactoring
loading the app works now
however, reloading (using boot-reload) doesn't work reliably
I was able to get past most of the issues with your patch, but I can’t seem to get the app to load. something about a require error or missing .registerComponent (which I clearly do).
yeah, om.next vs reagent shouldnt make a big difference
hehe, keep me updated
@pesterhazy: with my error above, I see that the generation of the source maps isn’t working
@boorad: I think that's true
it errors out once it tries to generate source maps
is there a way to disable source maps temporarily:?
yeah we're seeing the same "Found a source and line" error
another question
with the split of react-dom
and react
, I think we can't use react-dom
in react-native anymore
however, reagent.core/render was previously used for boot-react-native to re-render the app on reload
is there an equivalent or ReactDOM.render for react-native?
source maps can be turned off in brn/resources/mattsum/boot_rn/js/cljs-rn-transformer.js
can we just skip the cljs-rn-transformer?
I mean, long-term, I’m going to want it to generate valid source maps so I can see where in cljs code I’ve screwed up
yes of course 🙂
ok I managed to get reloading to work
the problem was reagent.core/render not working anymore because of the ReactDOM/ReactNative split
https://github.com/pesterhazy/boot-react-native/commit/619fa02d1ab10ce2d75686b3ff623251626bfc8f
you only see the source map error if there's an exception, correct?
ok, omitting cljs-rn-transformer from startup opts on the packager gets rid of the error
so we have a dated getBasicMapping to fix as well, when we get back to cljs-rn-transformer.
@pesterhazy: how does RN identify your main function? I see on-js-reload mentioned in build.boot, and (cljs :main … but that gives me an error.
I feel like I’m not getting to the part of my code that has the AppRegistry.registerComponent
what do you mean by 'main function"?
it has
(cljs :main "mattsum.simple-example.core"
:ids #{"main"})
I think that's it
this is not very pretty -- it should be in an .edn file instead (as in dist.cljs.edn)
haha, that's probably because boot-cljs moved towards putting everything in an edn file
create an edn file in resources called, I think, main.edn
then refer to it using :id "main"
don't rename it, I think "main.out" is still hard-coded in boot-react-native
maybe it's easier to go back to an earlier boot-cljs
otherwise, changing SimpleExampleApp would be appreciated
I put it off for too long, unfortunately
now I'm hoping to get it back in shape again
SimpleExampleApp's build prints out Writing main.cljs.edn...
I guess that's boot-cljs
and if it exists, like I just tried, then it says Adding :require adzerk.boot-reload to main.cljs.edn…
cool!
no I'd like to clean it up to get it merged (basically squash my WIP commits)
however, it'd be great if @mjmeintjes could weigh in
I've started creating issues for the remaining problems, it'd be great if you could do that as well
regarding source-maps — there are known issues with 1.9.93
so make sure you don't run on that version
@martinklepsch: good to know
@martinklepsch: could you have a quick look at this comment? https://github.com/mjmeintjes/boot-react-native/issues/57#issuecomment-235339018
@martinklepsch: is there a way to make boot not touch unchanged files?
@boorad: added https://github.com/mjmeintjes/boot-react-native/issues/59 with my proposal
@pesterhazy: not that I know of
@pesterhazy: does your dev pipeline always contain target
?
@martinklepsch: yes, it has to
because the react-native packager accesses the js files generated and dropped in the target dir
ideally this could be done from boot's tempdir of course, but that proves a not-so-easy refactoring
@pesterhazy: I have #46 included, and am trying to get reloading to work.
if I can figure out how to call om.next’s equivalent of reag/render for different views I have, then I think it’ll work.
sending back to (main) doesn’t seem to work, maybe because I’m calling .registerComponent again
Check my latest commits for how to call render
Registercomponent should only be called once (though I think it works if you do it multiple times?
I ran into many issues with master
I'm sure it can be made to work but it was too much effort for me at the time