reagent

Clojuri0an 2023-03-19T02:11:02.291899Z

(defn sample-component []
  [:div
   [:p "I am a component!"]
   [:p.someclass
    "I have" [:strong "bold"] "text."]])

(defn mountit []
  (r/render [sample-component]
             (.-body js/document)))

 (defn init []
   (println "Hello world")
   (sample-component)
   (mountit))
returns
Reagent.core/render function was moved to reagent.dom namespace in Reagent v1.0.
on build
reagent.core/render is deprecated    
halp

✅ 1
Clojuri0an 2023-03-19T02:18:58.901779Z

Think I figured it out, was calling reagent.core instead of reagent.dom

Clojuri0an 2023-03-19T02:25:03.367509Z

Error: Target container is not a DOM element.

Clojuri0an 2023-03-19T02:39:27.755329Z

Figured out, needed an index.html of the form

<head>

      <title>
     title
  </title>
    </head>
  <body>
        <script src="./js/invoice-frontend.js"></script>
    </body>
  </html>

Clojuri0an 2023-03-19T04:53:26.705939Z

/** @type {import('tailwindcss').Config} */
module.exports = {
    content: ['./src/main/invoice/frontend/*.{cljs}',
	      './invoices/invoice-frontend/js/*.{js}',],
  theme: {
    extend: {},
  },
  plugins: [],
}
seems to be unable to pull :class tags from in src/main/invoice/frontend/main.cljs. Anyone here using tailwind with cljs?

✅ 1
p-himik 2023-03-19T08:12:40.733129Z

No clue whether these projects are relevant to your particular problem, but at least they're relevant to the question: • https://github.com/jacekschae/shadow-cljs-tailwindcsshttps://github.com/teknql/shadow-cljs-tailwind-jithttps://github.com/wilkerlucio/tailwind-garden Somewhat relevant: • https://github.com/green-coder/girouettehttps://github.com/mainej/headlessui-reagent

👍 2
Clojuri0an 2023-03-19T13:24:20.125219Z

Thanks, was able to get it working by comparing my config to shadow-cljs-tailwindcss repo

👍 1