rum

simongray 2022-05-02T14:02:57.311799Z

What is the equivalent of reagent’s :> or adapt-react-class ? https://github.com/reagent-project/reagent/blob/master/doc/InteropWithReact.md#creating-reagent-components-from-react-components i.e. how can I use a react component from a JS library in Rum? Or is this not possible?

simongray 2022-05-02T14:04:10.366379Z

(I have the library imported via shadow-cljs already)

simongray 2022-05-02T15:12:11.387259Z

Ok, I think I got it to work via rum/adapt-class . It didn’t work at first because I hard to do it to the value of the .-default attribute of the imported JS lib, e.g. `

(rum/adapt-class
  (.-default react-graph-vis)
  ...)

Marko Vukovic 2022-05-02T22:28:05.829399Z

I want to create a simple app with server-side rendering. Are there are good project examples?

Marko Vukovic 2022-05-04T19:25:33.887079Z

thank you both!

Niki 2022-05-03T10:21:26.640569Z

Not sure how good, but Grumpy.website does a bit of it https://github.com/tonsky/grumpy/blob/6b5da0f86b29c687fa163b0a8d1471638382b676/src/grumpy/core/web.clj#L67-L113

serioga 2022-05-03T17:29:19.528959Z

@mvukovic.cloud here as well https://github.com/serioga/webapp-clojure-2020