shadow-cljs

https://github.com/thheller/shadow-cljs | https://github.com/sponsors/thheller | https://www.patreon.com/thheller
zhuxun2 2020-11-09T04:14:46.412800Z

Is there a way to suppress a particular :redef warning?

zhuxun2 2020-11-09T04:19:33.413600Z

OK, Seems like (:refer-clojure :exclude [map]) is more appropriate https://stackoverflow.com/questions/51511643/disable-compiler-warnings-for-a-specific-file-in-clojurescript

mccraigmccraig 2020-11-09T16:34:58.414400Z

do modules work ok with react-native ?

thheller 2020-11-09T16:57:12.415200Z

@mccraigmccraig you can declare :chunks {:foo your.components.foo/some-var :bar your.components.bar/some-var} in your :react-native build config

thheller 2020-11-09T16:57:24.415600Z

that will create a foo.js and bar.js in the :output-dir

thheller 2020-11-09T16:57:32.415800Z

that you can load at runtime

thheller 2020-11-09T16:57:49.416Z

uses :modules under the hood

thheller 2020-11-09T16:58:57.417200Z

just (js/require "./foo.js") somewhere and the result of that should be some-var

mccraigmccraig 2020-11-09T17:00:28.418Z

excellent - i can have my cake and eat it 😃... is there an idiomatic rn project somewhere that demos config with shadow-cljs for chunks, live-reload etc ?

thheller 2020-11-09T17:01:07.418500Z

not aware of anything public using :chunks. I could never quite get it to work with react-native to actually lazy load it

thheller 2020-11-09T17:01:45.418900Z

dunno if this is still current but it required tuning on the JS side

thheller 2020-11-09T17:02:18.419500Z

but others have reported that it sort of got faster with :chunks

thheller 2020-11-09T17:02:46.420100Z

but the RAM bundle stuff I never got working and I don't use react-native so I have never built an actual app that uses this

mccraigmccraig 2020-11-09T17:05:08.420700Z

ok, sounds like i need to build a simple poc with some :chunks

thheller 2020-11-09T17:10:23.421200Z

looks like status is using chunks. maybe talk to them https://github.com/status-im/status-react/blob/develop/shadow-cljs.edn#L54-L55

mccraigmccraig 2020-11-09T17:12:18.421700Z

dyu know anyone who works @ status ?

mccraigmccraig 2020-11-09T17:15:52.423900Z

well, it looks like status is using a very compatible set of tech to us, so i'll just try out their build 🙂

thheller 2020-11-09T17:15:59.424200Z

pretty sure they are in slack. IIRC I talked to @yenda about :chunks

mccraigmccraig 2020-11-09T17:16:23.424400Z

cool - thanks @thheller!