Skip to content

Instantly share code, notes, and snippets.

@Danetag
Created May 20, 2020 00:14
Show Gist options
  • Save Danetag/091286a9b210871e1754bd9c01830b52 to your computer and use it in GitHub Desktop.
Save Danetag/091286a9b210871e1754bd9c01830b52 to your computer and use it in GitHub Desktop.
import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';
// my-component-library is the name of our made up Web Component library
// that we have published on npm
import { applyPolyfills, defineCustomElements } from 'my-component-library/loader';
ReactDOM.render(<App />, document.getElementById('root'));
applyPolyfills().then(() => {
defineCustomElements(window);
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment