reagent

A minimalistic ClojureScript interface to React.js http://reagent-project.github.io/
lilactown 2021-03-24T01:50:30.034400Z

do you have React installed? older versions of reagent depended on react-cljsjs; new versions expect you to install React yourself, either by depending on react cljsjs in your app or via npm depending on your project setup

👍 1
Brice Ruth 2021-03-24T03:40:40.034800Z

hiya - I created that issue, so ... I may be able to answer - I don't see an explicit react dependency

Brice Ruth 2021-03-24T03:43:01.035Z

specifically, it has an :exclusions for cljsjs/react

lilactown 2021-03-24T03:59:39.035200Z

in your app?

Brice Ruth 2021-03-24T04:08:12.035700Z

I got something that at least got through to compiling the JS ...

:dependencies [[org.clojure/clojure "1.10.1"]
                 [org.clojure/clojurescript "1.10.773"]
                 [reagent "1.0.0"]
                 [cljsjs/react "15.6.1-1"]
                 ;; [cljsjs/react-with-addons "15.6.1-0"]
                 [cljs-react-test "0.1.4-SNAPSHOT" :exclusions [cljsjs/react-with-addons]]
                 [prismatic/dommy "1.1.0"]]

Brice Ruth 2021-03-24T04:08:49.035900Z

but, it fails then ...

Error while loading file: "resources/public/js/compiled/test.js"
SyntaxError: resources/public/js/compiled/test.js:285:503 Expected an operand but found const

Brice Ruth 2021-03-24T04:09:30.036100Z

might be because I'm trying with nashorn since I haven't taken the time to setup karma/chrome-headless/etc.

Brice Ruth 2021-03-24T04:14:04.036400Z

setting that up right now to check ... be just a minute

gadfly361 2021-03-24T04:14:22.036600Z

In addition, I think cljs-react-test won't work with new versions of react / is no longer maintained. I am curious what is currently used by the community as a replacement.

Brice Ruth 2021-03-24T04:14:30.036800Z

was running in a Docker container, but setting all that up in there is a PITA ...

Brice Ruth 2021-03-24T04:14:53.037Z

yeah - ultimately, I'm not trying to get something SPECIFIC to work ... I'm trying to write tests with reagent ... that's all - what's being used?

Brice Ruth 2021-03-24T04:15:01.037200Z

nobody testing?

gadfly361 2021-03-24T04:16:47.037400Z

@bdruth yeah, for sure, i am also interested in whatever the current testing practices are and would prefer replacing that recipe all together (since it is stale and now broken after the blind version updates to all the recipes)

Brice Ruth 2021-03-24T04:17:46.037600Z

yah

Brice Ruth 2021-03-24T04:17:49.037800Z

23 03 2021 23:17:21.242:WARN [web-server]: 404: /out/goog/deps.js
23 03 2021 23:17:21.268:WARN [web-server]: 404: /out/cljs_deps.js
Chrome Headless 89.0.4389.90 (Mac OS 11.2.2) ERROR
  Uncaught TypeError: Cannot read property 'TestUtils' of undefined
  at out/cljs_react_test/utils.js:79:48

  TypeError: Cannot read property 'TestUtils' of undefined
      at out/cljs_react_test/utils.js:79:48


Subprocess failed (exit code: 1)

lilactown 2021-03-24T04:23:27.038Z

we use react-testing-library at work

lilactown 2021-03-24T04:25:25.038500Z

but honestly I think a lot of teams eschew testing their front end outside of manual testing or browser automation

Brice Ruth 2021-03-24T04:25:35.038700Z

k, I'll take a look - also found https://francisvitullo.medium.com/a-way-of-testing-views-in-clojurescript-apps-98aaf57c5c2a

Brice Ruth 2021-03-24T04:26:08.039Z

will take a deeper look tomorrow!

Brice Ruth 2021-03-24T04:26:11.039200Z

thx all 🙂

lilactown 2021-03-24T04:26:14.039400Z

👍:skin-tone-2:

gadfly361 2021-03-24T04:28:54.039600Z

@bdruth @lilactown thanks! Regarding the recipe in question, I think for now I'll revert the version of reagent back and move it to the 'old recipes' section. I'll also add a note in the readme that new testing recipes are welcomed.