Fork me on GitHub
#clojurescript
<
2018-02-04
>
raheel05:02:07

I am trying to use react-transition-group from https://github.com/cljsjs/packages/tree/master/react-transition-group. However,

(:require
            [reagent.core :as r]
            [react-transition-group :as react-transition-group])
gives me a Javascript error in the console: "Error: Undefined nameToPath for react_dom"

raheel05:02:43

I have [cljsjs/react-transition-group "2.2.0-0"]] in the dependency

raheel06:02:38

ah, I was using the instructions that came up in cljsjs when I clicked on that library: This package also supports :global-exports, so you can use it like it was a real namespace: (ns your.namespace (:require [react-transition-group :as react-transition-group])) (react-transition-group/someFunction)

raheel06:02:40

but even doing

(ns mynamespace
  (:require [reagent.core :as r]
            [cljsjs.react-transition-group]
            ))
ends up with the same error

lgessler06:02:50

oh huh interesting, not sure what's going wrong then

lgessler06:02:56

i'm assuming that "like it was a real namespace" also means that you can write (ns/func-name) instead of (.funcName js/JSObj)?

raheel06:02:25

I believe so. But there is something off here, so that even the require triggers that error for me