reagent

Ryan 2023-05-10T19:47:51.782129Z

I have a JS react component I instanciate like so: [:> TabView]. If I make a component that outputs its relevant [:> TabPanel] .. I get no output. If I put the [:> TabPanel] directly as a child of the TabView, works great. Any clues?

p-himik 2023-05-10T19:51:13.993039Z

Maybe TabView really wants for instances of TabPanel to be its direct children. Or maybe there's a mistake in how you're creating the wrapper component.

Ryan 2023-05-10T19:53:39.812589Z

I think its the former, I tried a really static payload for the TabPanel and it behaved similarly identically. Is there any way to write a fn to output the direct TabPanel? I know I’ve had to use reagent.core/as-element to pass components in fn parameters with this library, but it didn’t seem to do the trick here.

p-himik 2023-05-10T19:54:52.325069Z

Sure - just write a regular function and call it directly with (...) instead of using it in Regent Hiccup as [...].

Ryan 2023-05-10T19:55:39.656209Z

Aha. Of course. Thanks so much @p-himik 🙂

👍 1