Fork me on GitHub
#fulcro
<
2021-03-06
>
holyjak00:03:20

Hello! https://github.com/holyjak/fulcro-troubleshooting has been extended (v5, latest) to check initial state (even in lambda form) for validity and to wrap user components with error boundary so that an exception during render does not blow up the whole up. Please give it a try! https://github.com/holyjak/fulcro-troubleshooting/blob/master/CHANGELOG.md#v5---2021-03-06

đź‘Ź 9
🎉 3
holyjak15:03:08

Seeing https://codesunaba.netlify.app/, would it be possible to make a fork with Fulcro? It is macro-heavy but I suppose the macros do not necessarily need to use any CLJ JVM specific code. What do you think, @tony.kay ? It would make creating interactive, hands-on Fulcro tutorials much simpler 🙂

tony.kay04:03:07

Not easily. Many of the macros in Fulcro expect the JVM because of SSR support, and would all have to be ported to bootstrapped cljs. It of course is possible, but it would need to be an actual fork, since it would be way too much work to try to maintain bootstrapped cljs support while also not breaking functionality.

tony.kay04:03:31

But then maintaining a fork is quite a pain

holyjak07:03:39

I see. Thank you!

đź‘Ť 3
tony.kay18:03:34

It’s actually come up a few times as a desire (it would be cool). If memory serves correctly it isn’t just Fulcro that’s the problem…the macros actually are not that hard to port. The bigger problem was that it has a spiderweb kind of effect, where all of the dependencies have to be bootstrap compatible. So, something as simple as logging (we use timbre) cause issues, because those dependencies are also not bootstrap compatible.

đź‘Ť 3
Marcus16:03:53

app.ui=>  (comp/get-initial-state app.ui/Root {})
------ WARNING - :undeclared-var -----------------------------------------------
 Resource: :1:25
 Use of undeclared Var app.ui/Root
--------------------------------------------------------------------------------
{:friends {:list/label "Friends", :list/people [{:person/name "Sally", :person/age 32} {:person/name "Joe", :person/age 22}]}, :enemies {:list/label "Enemies", :list/people [{:person/name "Fred", :person/age 11} {:person/name "Bobby", :person/age 55}]}}
I am going through the getting started section in the fulcro book. Do you know why this happens? (defsc Root ...) is in this ns and the returned map is correct.

holyjak16:03:30

happens to me sometimes as well. I solve it I think by reloading the ns. ClojureScript repl has its mysteries...

Marcus17:03:21

hehe ok thanks 🙂