shadow-cljs

https://github.com/thheller/shadow-cljs | https://github.com/sponsors/thheller | https://www.patreon.com/thheller
sova-soars-the-sora 2020-10-16T18:10:58.469400Z

Hey all, I keep getting this funky warning:

------ WARNING #1 -  -----------------------------------------------------------
 Resource: com/cognitect/transit.js:649:8
 variable module is undeclared

sova-soars-the-sora 2020-10-16T18:11:38.469800Z

And in the console, for the minified release version there is:

winjpc.js:145 TypeError: Cannot read property 'call' of undefined
    at pa (winjpc.js:262)

sova-soars-the-sora 2020-10-16T18:12:01.470300Z

I have ajax and rum as dependencies, the watch build works locally, but when I upload a release to my box it is no worky...

sova-soars-the-sora 2020-10-16T18:27:59.470600Z

is it problematic that my namespace is a single word with no dots?

sova-soars-the-sora 2020-10-16T18:29:52.471Z

DOH renamed the build didn't change the console line to compile w/ new name xD

sova-soars-the-sora 2020-10-16T18:35:29.471300Z

maybe

sova-soars-the-sora 2020-10-16T18:40:24.471500Z

no dice ;/

sova-soars-the-sora 2020-10-16T18:46:01.471900Z

so the non-minified code says "move data fetching to componentDidUpdate" ... it's a warning

sova-soars-the-sora 2020-10-16T18:46:10.472200Z

and then when I make a release build... it just doesn't work

sova-soars-the-sora 2020-10-16T18:52:30.472500Z

Yeah, not really sure... maybe you guys get these errrors sometimes?

sova-soars-the-sora 2020-10-16T18:52:45.472600Z

Karol Wójcik 2020-10-16T19:09:08.473400Z

That’s probably lack of externs

sova-soars-the-sora 2020-10-16T19:17:19.473600Z

Oh

sova-soars-the-sora 2020-10-16T19:17:23.473800Z

Thank you. Will look into it now.

sova-soars-the-sora 2020-10-16T19:23:38.474Z

I added :infer-externs :all to the shadowncljs edn ... no difference yet... hrm

sova-soars-the-sora 2020-10-16T19:48:24.474200Z

oh it needs :compiler-options {:infer-externs :auto} let's se if that does the trick...

macrobartfast 2020-10-16T21:20:13.475Z

can someone point me in the direction of a current tutorial on how to use npm react components in a shadow-cljs/reagent project?

macrobartfast 2020-10-16T21:20:35.475600Z

I found a couple on the googles but I am worried they may not be current.

macrobartfast 2020-10-16T21:23:34.477100Z

I want to use https://codesandbox.io/s/react-piano-basic-demo-forked-q5xyj in a lein new reagent myapp +shadow-cljs generated project… I’m not sure I can do this in ClojureScript, actually.

sova-soars-the-sora 2020-10-16T21:49:53.477700Z

i think rumnext can make rum components out of javascript, not 100% sure

macrobartfast 2020-10-16T21:54:21.478300Z

but I’m truly floundering.

dpsutton 2020-10-16T21:57:11.479Z

https://github.com/dpsutton/asg-ignite-presentation is a repo with links to a presentation, a demo app built and deployed onto netlify, and the repo of the app. it uses npm deps and shadow-cljs

macrobartfast 2020-10-16T21:58:11.479400Z

sweet!

sova-soars-the-sora 2020-10-16T21:58:30.479700Z

dpsutton with the clutch fix =]

🙂 2
1
macrobartfast 2020-10-16T21:58:42.479900Z

always.

sova-soars-the-sora 2020-10-16T23:05:06.481Z

when it doubt.. baby steps and comment out

sova-soars-the-sora 2020-10-16T23:11:15.481700Z

When I add these lines, everything breaks

[:input.insit { :type "text"
		        :value rc
				:auto-focus :true
                :on-change (fn [e] 	(reset! email-input (.. e -target -value)))}]

sova-soars-the-sora 2020-10-16T23:11:24.481900Z

sanity check

sova-soars-the-sora 2020-10-16T23:24:31.482300Z

i think :value is not necessary... hrm

sova-soars-the-sora 2020-10-16T23:25:06.482600Z

🎵 "minutes change like seasons, i'm just talking to myself.."

sova-soars-the-sora 2020-10-16T23:26:04.482800Z

WOW. that was the offending line xD

sova-soars-the-sora 2020-10-16T23:26:15.483Z

thanks for stickin' it out with me boiz

sova-soars-the-sora 2020-10-16T23:26:22.483200Z

i know you're here in spirit 😄

😇 1