const CustomEditor = ({ value, onChange }) => (
<HtmlEditor
options={options}
value={value}
onChange={onChange}
render={({ editor, view }) => (
<div>
<MenuBar menu={menu} view={view} />
{editor}
</div>
)}
/>
)
How do I express the render function here in reagent?
I have MenuBar and menu defined
[:> HtmlEditor {:options options
:value @value
:onChange #(reset! value %)
:render (fn [props]
(js/console.log props)
[:div
[:> MenuBar {:menu menu :view (o/oget props "view")}]
[:> (o/oget props "editor")]])}]]))
This is what I’ve tried so far.
Looks like reagent doesn’t like the js objects in hiccup
Hi, is it possible to sprinkle reagent (or re-frame) components into a server side rendered monolith without going full SPA? #re-frame
Depends what you mean by components; if "mini SPAs embedded in page", yes for reagent, and yes with limitations for re-frame (limitations because global app-db); if "DOM attached behavior a-la StimulusJS or Vue.js" no.
Thanks, that's good to know. Yes I was aiming for the Vue.js style of sprinkling in components.