Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save BerndWessels/949e84138886981694859cd44730aded to your computer and use it in GitHub Desktop.
Save BerndWessels/949e84138886981694859cd44730aded to your computer and use it in GitHub Desktop.
/* eslint-env browser */
import React from "react";
import ReactDOM from "react-dom";
import EmployeeSearchForm from "./employeeSearchForm"; // React implementation of the Employee Search Form micro front-end.
class BusinessSolutionEmployeeSearchFormCustomElement extends HTMLElement {
connectedCallback() {
this.render();
}
set api(val) {
this._api = val;
this.render();
}
render() {
ReactDOM.render(<EmployeeSearchForm api={this.api}/>, this);
}
}
customElements.define(
"business-solution-employee-search-form",
BusinessSolutionEmployeeSearchFormCustomElement
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment