This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-10-06
Channels
- # aleph (79)
- # bangalore-clj (3)
- # beginners (49)
- # boot (74)
- # cider (10)
- # cljs-dev (21)
- # cljsrn (2)
- # clojure (105)
- # clojure-berlin (1)
- # clojure-brasil (1)
- # clojure-dusseldorf (1)
- # clojure-korea (1)
- # clojure-poland (3)
- # clojure-russia (38)
- # clojure-spec (146)
- # clojure-uk (20)
- # clojurescript (70)
- # cloverage (1)
- # component (1)
- # core-async (23)
- # css (16)
- # cursive (22)
- # datascript (1)
- # datomic (22)
- # defnpodcast (6)
- # emacs (60)
- # events (1)
- # hoplon (94)
- # jobs (1)
- # jobs-rus (13)
- # luminus (11)
- # off-topic (11)
- # om (48)
- # onyx (5)
- # proton (7)
- # re-frame (87)
- # reagent (39)
- # rethinkdb (1)
- # ring-swagger (14)
- # rum (6)
- # specter (14)
- # untangled (105)
- # vim (6)
- # yada (22)
@superstructor ^^^^ do you have any advice
Reagent now is dependent on these two packages: [cljsjs/react-dom "15.2.1-0"] [cljsjs/react-dom-server "15.2.1-0”] Before we had this in our build.boot: [reagent "0.6.0-rc" :exclusions [cljsjs/react]] [cljsjs/react-with-addons "15.1.0-0”] When upgrading: [reagent "0.6.0" :exclusions [cljsjs/react]] [cljsjs/react-with-addons "15.3.1-0”] should I instead add react-dom and react-dom-server to the exclusions?
@borkdude You need both react-dom and react-dom-server, but you can either 1. use global exclusion to drop react dep from react-dom and react-dom-server 2. exclude react-dom and dom-server from reagent and add direct dep to all three packages
@juhoteperi what about: [reagent "0.6.0" :exclusions [cljsjs/react]] [cljsjs/react-with-addons "15.3.1-0”] is that sufficient?
@borkdude No, reagent doesn't have direct dependency to cljsjs/react so that exclusion doesn't work
but I’ll go for your solution thanks @juhoteperi
:exclusions [cljsjs/react]
:dependencies [[reagent "0.6.0"]
[cljsjs/react-with-addons "..."]]
;; or
:dependencies [[reagent "0.6.0" :exclusions [cljsjs/react-dom cljsjs/react-dom-server]]
[cljsjs/react-with-addons "..."]
[cljsjs/react-dom "..." :exclusions [cljsjs/react]]
[cljsjs/react-dom-server "..." :exclusions [cljsjs/react]]]
I guess Reagent readme should be updated
global exclusions are applied to transitive dependencies also
Hey, does one of you know if it's intentional that you can't nest wraps in cursors? Or if it's a bug?
What do you mean, @j_pb? Could you give an example?
@reefersleep Not sure if there is just a case missing in the assert or if it's done intentionally.
Good question. I can see that I am not it to answer it, as I only just heard of r/wrap when you introduced it now 🙂
It behaves like an atom, in my case that is ok, because changing the wrap will also nuke the component hierarchy below.
From the description on https://reagent-project.github.io/news/news050.html , I think you're on the right path with wrap not being reactive. But that's as far as I can get right now 🙂
Has this been renamed in React?
(reagent/adapt-react-class js/React.addons.CSSTransitionGroup)
Should this be correct code (indentation aside)?
(ns foo
(:require [cljsjs.react :as react]
[reagent.core :as reagent]))
(reagent/adapt-react-class react/ReactCSSTransitionGroup)
@borkdude I think it just adds js/React
to the global namespace
how was it solved?
@pesterhazy I had to write js/React.addons.CSSTransitionGroup or something
@pesterhazy but the major issue was that some other dependency pulled in react instead of react with addons
I created PR to fix with-addons example on Reagent readme: https://github.com/reagent-project/reagent/pull/266
@juhoteperi actually this worked for me eventually:
[reagent "0.6.0" :exclusions [cljsjs/react]]
[cljsjs/react-with-addons "15.2.1-0"]
the exclusion probably works on transitive dependencies, so it works for react-dom as well which is a dependency of reagent
@borkdude Did you check the dependency tree? It might work due to with-addons overwriting foreign-lib from normal dep, but you could still have the dependency on classpath
You are correct.
I did check deps tree again myself
[reagent "0.6.0" :exclusions [[cljsjs/react]]]
├── [cljsjs/react-dom-server "15.2.1-0"]
└── [cljsjs/react-dom "15.2.1-0”]
…
[cljsjs/react-bootstrap "0.30.2-0" :exclusions [[org.webjars.bower/bootstrap] [cljsjs/react]]]
└── [cljsjs/bootstrap "3.3.6-0"]
[cljsjs/react-with-addons "15.2.1-0"]
I have probably had transitive dependencies to cljsjs/react from other deps than Reagent which is why I have used global exclusion