shadow-cljs

witek 2025-05-15T11:29:05.047059Z

Hi. I have this example import: import SortableList, { SortableItem } from 'react-easy-sort'. What is the ns syntax for this in ClojureScript?

Matti Uusitalo 2025-05-15T12:02:27.365369Z

Looking at https://shadow-cljs.github.io/docs/UsersGuide.html#js-deps and https://github.com/thheller/shadow-cljs/blob/master/test-project/src/main/test/js_interop_test.cljs I would try

(:require 
  ["react-easy-sort$SortableList" :as SortableList]
  ["react-easy-sort" :refer (SortableItem)])
or :rename if you want to alias it

witek 2025-05-15T12:04:56.261309Z

thank you!

thheller 2025-05-15T15:11:10.999529Z

that is unfortunately wrong 😛

thheller 2025-05-15T15:11:51.517919Z

["react-easy-sort$default" :as SortableList] + ["react-easy-sort" :refer (SortableItem)]

Matti Uusitalo 2025-05-15T15:35:29.574279Z

Thanks for the correction. I misread the export somehow and missed the default export. Sorry about that!