Fork me on GitHub
#reagent
<
2020-05-01
>
Vishal Gautam00:05:23

@thheller Hi thomas, I am trying to use framer with your excellent shadow-cljs library in a reagent application. When I try to import the module. I get this error. Do you know why this might be the case. I tried googling first but couldnt get an answer

Compilation failed!
Closure compilation failed with 1 errors
--- node_modules/framer/build/framer.js:2
Class names defined inside a function cannot be reassigned.
here is the component
(ns 
  (:require [slack.views :refer [nav channel]]
            ["framer" :as f]))

thheller06:05:14

@vishal.gautam framer compiled fine for me. which version do you use? shadow-cljs and framer?

Vishal Gautam14:05:32

@thheller I was using older version of shadow-cljs, Then I upgraded to latest version on package.json ie. "shadow-cljs": "2.8.109" , deleted node_modules, reinstalled everything and restarted the server, and I still get this error. Framer I am using this version: "framer": "1.1.7" .

thheller14:05:52

do you use only shadow-cljs.edn or also project.clj/deps.edn?

thheller14:05:07

you can try :compiler-options {:output-feature-set :es6} in your build config

🎉 4
Vishal Gautam14:05:40

I am using shadow-cljs.edn only. Okay that did the trick! Danke! 😉

Johnson15:05:56

Hey, was hoping to get some help. I'm trying to use the react-particles-js library with a reagent/re-frame project, I can get it to display, but the interactivity/hover isn't working. Was wondering if there is something glaringly obvious I'd missed, pretty new to this. This is the element in question:

[:> Particles
        {:particles {:number {:value 200
                             :density {:enable true
                                       :value_area 1000}}}
         ;; This bit doesn't work:
         :interactivity {:detect_on "canvas"
                         :events {:onhover {:enable true
                                   :mode "repluse"}}}]
Thanks for your help