Fork me on GitHub
#fulcro
<
2018-02-23
>
tony.kay04:02:58

@donmullen curious if you figured it out

donmullen12:02:27

@tony.kay - I ended up cloning the incoming js-props with gobj/clone - setting values on that and passing it on. That works - unclear of the ramifications.

donmullen13:02:23

Turns out the js-props object was frozen. See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/freeze - so cloning it and passing it on seems the right call.

tony.kay15:02:39

@donmullen Ah thanks. I actually started to suggest it seemed immutable, but didn’t know this method existed in js.

donmullen15:02:03

@tony.kay - There is also Object.seal() - and functions isFrozen() and isSealed() to check. By definition - all frozen objects are also sealed.

tony.kay15:02:18

Yeah, I see that in the docs now

levitanong19:02:53

hi all, just curious. how’s the fulcro shadow-cljs template coming along?

donmullen19:02:11

@levitanong I’ve been using a template with the shadow-cljs option for some react component integration testing :`Usage: lein new fulcro app-name [-h|demo|nodemo|v1|shadow-cljs]` — the shadow-cljs builds are working well.

tony.kay20:02:47

@levitanong I’ve been using it with a client, and it’s going well. Thomas seems willing and able to release a fix almost as soon as anyone reports it, so I’d say even if you find a problem you won’t be stuck for long. We had initial problems with the REPL in IntelliJ, but that’s been fixed since about 2.1.16

tony.kay20:02:13

I’d recommend bumping to the latest version, whatever it is (in package.json AND project.clj).

donmullen20:02:06

Agreed - I had a minor issue with binaryage/oops that was giving an error in the repl - Thomas had it fixed about 5 minutes after I reported it in the slack channel! Definitely get the latest (currently 2.1.25).

levitanong20:02:28

nice! considering migrating my current work project over to shadow-cljs since npm integration has been dodgy

donmullen20:02:49

@levitanong Couple of things to note. Consider running the shadow-cljs server (https://shadow-cljs.github.io/docs/UsersGuide.html#server-mode) - as startup is a bit slow (Thomas removed AOT recently until working out some issues). Also - shadow-cljs did drop cljsjs support - but that’s generally not a problem as most are just simple wrappers. Pulling in directly from npm is much better!

levitanong20:02:02

Thanks for the tips, @donmullen !

mss21:02:43

are there any notes about how to slide custom html tag types into an app and have it play nicely with fulcro? building on electron and I’d like to use a tag that doesn’t exist in the html spec

mss21:02:01

grepped around the book but couldn’t really find anything on it

mss21:02:33

looks like I can utilize the dom/element fn, just want to make sure that’s actually the right way to do this

mss21:02:01

actually I take that back, looks like that fn is clj only and not available on the client. open to any suggestions!

mss22:02:56

yep that works no problem. was looking at the dom.cljc file and was a little confused how to swing that on the client 😅

mss22:02:58

thanks for the help