This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-12-06
Channels
- # adventofcode (99)
- # announcements (9)
- # aws (3)
- # babashka (22)
- # beginners (90)
- # boot (2)
- # calva (22)
- # cider (8)
- # clj-kondo (14)
- # cljsrn (20)
- # clojure (24)
- # clojure-europe (4)
- # clojure-italy (3)
- # clojure-losangeles (1)
- # clojure-nl (83)
- # clojure-spain (1)
- # clojure-spec (46)
- # clojure-uk (43)
- # clojuredesign-podcast (70)
- # clojurescript (40)
- # cursive (25)
- # datomic (9)
- # duct (3)
- # emacs (14)
- # figwheel-main (2)
- # fulcro (61)
- # graalvm (8)
- # juxt (7)
- # kaocha (2)
- # leiningen (19)
- # luminus (5)
- # malli (58)
- # off-topic (4)
- # re-frame (11)
- # reitit (5)
- # rewrite-clj (3)
- # shadow-cljs (63)
- # sql (5)
- # testing (5)
- # tools-deps (26)
- # uncomplicate (2)
- # vim (4)
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
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
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?
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.
@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.
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...
what web browser are you using?
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
Unless you’re in a really special situation, I wouldn’t think browser compat to be an issue
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.
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.
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