I have a small form component built using React that I want to make into an embeddable widget for use on other pages. I believe I heard Babelify can help accomplish this, but I'm honestly drawing a blank on how to get this working. I used Babelify to create a bundle.js of the form component, but sticking that on to a blank HTML page using <script src='bundle.js'></script>
didn't do anything. So clearly I am either misunderstanding something or am just...totally lost.
To set a widget as embeddable, go into the widget settings and check the "Make Embeddable" box. All visitors of you site will be able to see the <embed> link when hovering over the widget. Clicking the <embed> link with generate the iFrame code to embed the widget into a site. Copy the iFrame code.
In React, developers use iframes to create either a sandboxed component or an application that is isolated from its parent component. In an iframe, when a piece of content is embedded from an external source, it is completely controlled by the source instead of the website it is embedded in.
Created an embeddable widget with react by following this tutorial http://krasimirtsonev.com/blog/article/javascript-library-starter-using-webpack-es6
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With