This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-11-04
Channels
- # announcements (5)
- # babashka (2)
- # beginners (53)
- # biff (11)
- # calva (5)
- # cider (4)
- # clojure (32)
- # clojure-austin (2)
- # clojure-dev (5)
- # clojure-europe (17)
- # clojure-norway (22)
- # clojurescript (23)
- # core-logic (1)
- # cryogen (1)
- # datomic (1)
- # dev-tooling (7)
- # emacs (6)
- # fulcro (63)
- # guix (1)
- # hyperfiddle (14)
- # integrant (2)
- # lsp (6)
- # missionary (4)
- # nbb (42)
- # overtone (9)
- # reitit (8)
- # specter (3)
- # sql (2)
- # squint (7)
- # tools-build (9)
hi what is the current state of the reagent vs hellix. since reagent doesn't have hooks is the latest changes in react affecting it adversely compared to hellix?
You can use hooks in Reagent just fine. You just have to use function components - either everywhere or only where you need them but with a tiny bit of extra care (adding :f>
to Hiccup vectors that wrap function components).
so i hope learning reagent and reframe wouldn't be an issue in the future, can you suggest me some good resource to learn front end in reframe/reagent
I think their documentation is pretty much perfect. But if you're a complete beginner, then maybe something else would be better, I don't know.
yes, i'm a complete beginner i was looking for a guide aimed at complete beginners
A complete beginner with just Reagent/re-frame? Or CLJS? Or web development? Or development at all?
i'm tryng to do a project and i learned basic clojure plus pedestal for the backend, what i'm trying to learn is front end and i thought learning reagent/reframe will cover the whole front end in some sense
Mm, hard to say. CLJS and CLJ have their differences, and they both are affected by their underlying platform. JS is quite a lot on its own, CLJS adds to it, React adds to it a lot, Reagent adds to it yet again, and re-frame adds to it even more. I'm not sure starting from the top of this burger is the best choice.
I think most Clojure devs are just using reagent and re-frame without ever diving into JS/React, however building more advanced, interactive experiences requires good understanding of the browser platform and how React is integrated with it (update lifecycle and rendering for example).
You'll still be showered from that leaky abstraction sooner or later with things like lifecycle methods, keys, refs, synthetic events. And then just using an existing React library usually requires learning a lot. How to interop with React componets, the differences between elements/components/instances, when and how to convert between JS and CLJS data when working with HOCs, etc. All those are just the things I could remember while writing this message. The actual list is likely much larger.
...might be kind of like asking, "I only speak English but now that I am going to learn Mandarin, which city's dialect is easiest?" Start with reagent! The abstractions are leaky, so you will eventually learn lots of useful tidbits about other stuff. But that's ok! Better to learn useful tidbits, than not-so-useful!
Have trouble requiring the latest version of amplify in a shadow-cljs project. anyone else has the same problem?
["aws-amplify" :as amp :refer (Amplify Auth API graphqlOperation Storage )]
is problemetic. my package json has this version of amplify. The earlier version worked for me
"aws-amplify": "^5.3.11",
this means that Amplify
is undefined
. could be that the :refer
does not exist anymore or was renamed. do a (js/console.log amp)
or so in the REPL to check out what it is and what it exports
I was translating this working code from an example react project using the same version of the library aws-amplify 5.3.11.
import { Amplify, API, graphqlOperation } from 'aws-amplify'
aws-amplify
is notorious for confusing shadow-cljs and not working properly, so the only way is to actually check (and of course look at warnings/errors the browser console)
amp is #js {}
thats why I said to use js/console.log
and look at it in the actual browser console instead
o ok will do. thanks !!
Yes - the library has breaking changes. Will try other combinations.. https://github.com/aws-amplify/amplify-js#amplify-5xx-has-breaking-changes-please-see-the-breaking-changes-below
(.configure Amplify aws-exports)
=>
Cannot read properties of undefined (reading 'configure')