Created
October 7, 2020 18:24
-
-
Save BerndWessels/a5b3573e60042adc0712e9411fb10963 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
/* 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