DEV Community

Discussion on: Embedding React components in Elm with custom elements

Collapse
 
pavonz profile image
Andrea Pavoni

I know React and some very basic bits of Elm, but I didn't understand how it works. I mean, you gave the same name to both the components, and I'm finding it hard to get how both are interacting.

Can you explain/disambiguate?

Nice topic anyway, I had a similar task some year ago: dinamically render a form from an XML doc (along with XML Schema). The very first PoC was to use JSX to render XML tags like React components.

Collapse
 
norpan profile image
norpan

Hi!

Yes, actually there are three components involved. The first is the React component, the second is the web component, and the third is the Elm module. They exist in different layers, the web component wraps the React component and the Elm module wraps the web component.

Hopefully this clears it up. Feel free to ask for additional clarification.

Collapse
 
pavonz profile image
Andrea Pavoni

Yes, this clears it up a lot. Thank you :-)