Skip to content

Instantly share code, notes, and snippets.

@Mobiletainment
Last active May 31, 2020 21:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Mobiletainment/5faf91cc60594b5776484c197e18250c to your computer and use it in GitHub Desktop.
Save Mobiletainment/5faf91cc60594b5776484c197e18250c to your computer and use it in GitHub Desktop.
React app that uses Stencil components with type safe bindings and full framework integration
import React from 'react';
// this import uses path mapping under the hood to retrieve the generated source code
import { MyComponent } from 'ui-components-react';
export const App = () => {
return [
<h1>Welcome to React with full Stencil component integration!</h1>,
<MyComponent first="a Web Component / Custom Element"
middle={[
'with complex prop passing and easy event binding',
'for React'
]}
last="thanks to Stencil"
onNameClicked={e => alert(e.detail)}/>
];
};
export default App;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment