This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {Component} from "react"; | |
var CrossCustomEvent = require('customevent'); | |
var scriptLoader = require("load-script"); | |
module.exports = function(identifier) { | |
/* Customers pass some kind of identifier to this function. | |
* It might be a user name or an access key. | |
* Something that identifies the location of the script code of this customer | |
*/ | |
class Wrapper extends Component { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { render } from "react"; | |
import MyWidget from "./components/mywidget.jsx"; | |
window.MyWidgetRenderer = function(node, props) { | |
render(<MyWidget {...props} />, node); | |
}; |