Fork me on GitHub
#shadow-cljs
<
2020-11-09
>
zhuxun204:11:46

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

mccraigmccraig16:11:58

do modules work ok with react-native ?

thheller16:11:12

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

thheller16:11:24

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

thheller16:11:32

that you can load at runtime

thheller16:11:49

uses :modules under the hood

thheller16:11:57

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

mccraigmccraig17:11:28

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 ?

thheller17:11:07

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

thheller17:11:45

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

thheller17:11:18

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

thheller17:11:46

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

mccraigmccraig17:11:08

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

mccraigmccraig17:11:18

dyu know anyone who works @ status ?

mccraigmccraig17:11:52

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

thheller17:11:59

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