JSX dot notation Components in Clojurescript Reagent

80 Views Asked by At

I am trying to use a predefined React component with dot notation as such MultiSelect.Filterable in Reagent Clojurescript application but I can't seem to find the correct way to require it.

I am using a namespace :require like this, which doesn't work.

(ns example-app (:require [carbon-components-react :refer [MultiSelect]])
(def main []
  [:> MultiSelect.Filterable {:id "example"}])
1

There are 1 best solutions below

0
LordBertson On

Issue is that the dot notation is not parsed properly, what works is using the component as such

(def main []
  [:> (.-Filterable MultiSelect) {:id "example"}])