Fork me on GitHub
#reagent
<
2024-02-13
>
Mateusz Mazurczak14:02:01

Hi, I have a need to put HTML file in the middle of reagent component. (I'm using reagent, reitit and shadow-cljs) So something like


  
   />
   
>
I don't want to turn html into a hiccup, I would like to serve that html file in the middle of my reagent code. And for it to be as simple and easy to manage as possible. Best option would be to refer to html-file with just the path. I have two options in mind: 1. Use dangerouslySetInnerHTML and just paste the html string there 2. Use reagent inside reagent, so I will have there a <div id=second-root> and it will start second root there with the html file rendered But both of those options are not optimal, do you have an idea what could be done to achieve that?

p-himik14:02:32

The third, and IMO the most appropriate option, is to use an iframe.

👍 1