Fork me on GitHub

is fulcro compatabile with react hooks and react concurrent mode?


fulcro’s rendering model does not use those AFAIK


but you should have full JS interop and do it yourself in the parts of your app that need it


You cannot use hooks within Fulcro components…that could be fixed with a few days work, probably, but it isn’t high on any priority list.


just started learning clojure, so can't comment much yet but if one plans to use react w fulcro, isn't it better to embrace where the platform is going?


i ask because i'm interested in trying out fulcro but don't know what problems i might run into


jsut my 2 cents, fulcro components currently map to react components so the same restrictions apply, and the “problem” is no different, per se, than what you’d have trying to use hooks inside a react component. a good chunk of the motivation behind hooks, is addressed far more elegantly by fulcro’s marriage of db + component metadata, transactions, etc. I’d imagine the only problem you might run into would be using some 3rd party react lib that’s ‘hooks only’, etc

👍 4

yea that might be more of an issue in near future as more libraries move to using hooks


hook is a way to do state management right? most libraries are concerned with rendering not state management no? like a date picker component that takes in some props


perhaps i’m mistaken about what hooks are


hooks are an alternate way of doing the component lifecycle kinds of stuff, and can also be used to feed data into a component in an isolated fashion. They are not particularly useful in Fulcro, since the whole point of Fulcro is to unify your I/O story in a sane manner without it being peppered about the app in various ways.


but Fulcro could treat them as an implementation detail…a hooks? true option could switch the mode of defsc, and it would just not allow lifecycle methods then, and would tunnel props using hooks instead of setState


it’s not that hard, I don’t think…but not that useful either


yea, as @U0CKQ19AQ mentioned, hooks allow not only state inside functions (i.e. useState) but also hooking into component lifecycle (i.e. useEffect). i could see the use of unifying global store state and remote data sources (i.e. what would in js land might be separate redux store and apollo graphql store) but if a data concern is only local i definitely prefer to keep it local


in js that makes the component easier to reason about. but maybe that's not a problem with fulcro?


either way i'd still be concerned about interop with libraries that rely on hooks. i.e. new react navigation for react native uses hooks


anyway, watching fulcro youtube video tutorial now to get a better idea of framework. cool to see the Clojure development flow, too. thanks for the videos @U0CKQ19AQ


Welcome. Yeah, we don’t need hooks for data management, and library components can use hooks (React allows them to compose), so there isn’t a limitation I’m aware of.


In Fulcro Inspect I'm always getting "No app connected". I've tried F5, Shift F5, rebooting the machine, going back to a previous commit. Still always get it, and it doesn't make sense at this stage. Is there anything I can do to help myself?

Björn Ebbinghaus08:12:16

Did you allow 3rd-party cookies?


I've been developing with FI for a long time. Didn't change anything on that front recently that I know of. Just on localhost.


I was getting this because I had a typo in my shadow-cljs.edn file. I used dev-tools instead of devtools. Maybe something as simple as that?


Mine says devtools . But it hasn't been altered in a long time. Even deps.edn hasn't been altered for a while. Thanks all.

Piotr Roterski11:12:14

@U0D5RN0S1 I had this problem earlier and reinstalling the Fulcro Inspect chrome extension helped, you could try doing that


Thanks Piotr. That (re-install Chrome extension) was one of the things I tried before installing the Electron version, which actually fixed the issue.

👍 4

My current theory is that there's a timeout somewhere for the connection to happen and the JavaScript of my app just got big enough to be slow enough to trip it. (On an i5 Linux machine). Or else something to do with that tempid error.


I've also had this error a couple of times. I thought it was related to something in my state not being serializable, but reading this it might be something else.


If I right click on the FI pane itself (where it says "No app connected") I can get an error message: "Error: No reader function for tag fulcro/tempid". So perhaps that has something to do with it...

Robin Jakobsson09:12:11

what web browser are you using?

Robin Jakobsson10:12:40

I had that problem when using an ad-blocker


I have popup blocker and popup blocker pro. Both are set to allow popups to localhost:3000.


I just installed the Electron app and can see app state again. Certainly good that there's a way out when creepy weird stuff happens 👻


Someone asked me about browser compatibility and I didn't know what to tell them. It's an issue for us because some of our customers use a weird desktop CRM program that has an embedded IE widget. Would Windows 7 IE work?


As a first attempt at an answer, do Clojure/script and React work in that version of IE?


I'm not sure -- but it sounds like the answer to my question is probably, "You have to test to find out" -- that's reasonable, obviously, but harder to sell to management


Looks like no earlier than IE9


Thanks, that's really helpful


Unless you’re in a really special situation, I wouldn’t think browser compat to be an issue


I think that Windows 7 people can use IE 11


5.5: 0.01%
6: 0.01%
7: 0.00%
8: 0.10%
9: 0.04%
10: 0.03%
11: 1.53%


A lot of travel companies use a CRM system called ClientBase. If you pull up a company's record in the CRM, it will open their web page in an IE widget in the app. We ask people to use Chrome, but they don't, and this causes lots of support headaches.


Gosh, and what version is the IE?


Whatever they have installed on their system. But IE 9 was released in 2011


And we could say, dl IE 11, and install that


I would do whatever you can to push them toward that


We have problems with Vue apps, because devs tend to bring in libraries that don't work. I almost think that Fulcro would be better.


I think Clojurescript compiles to ES3


By default I think so


But I think that only applies to code compiled through the Google Closure compiler


So if you’re using cljsjs or shadow-cljs, I don’t think ES3 is guaranteed. Would have to check


@U05224H0W Would know about shadow-cljs 🙂


browser compatibility depends on the stuff you use. CLJS emits ES3 code but that doesn't mean anything if you use (js/Promise. ...) or something like that


ES3 even for npm libs?


like I said ... it depends on the stuff you use. that includes libraries you use.


you can transpile it down to whatever browser you want ... but you need to configure that


Sure. Thanks!


These are encouraging answers for us, thank you!


IMHO, it will be easier to "configure stuff" for legacy browsers in cljs then any other JS/Babelly/WebPack equivalent solution