Last active
May 31, 2020 21:09
-
-
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
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 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