polymer-react
Use React in Polymer 3 elements.
polymer-react

Use React in Polymer 3 elements.
Usage
import {PolymerElement, html} from '@polymer/polymer/polymer-element.js'
import React from 'react'
import 'polymer-react'
export class PRExample extends PolymerElement {
const props = {
bar: 10
}
static get template () {
return html```
<polymer-react render="[[render]]" props="[[props]]"></polymer-react>
```
}
render (props) {
return <YourReactElement foo={props.bar}></YourReactElement>
}
}
customElements.define('pr-example', PRExample)
Links
Compatibility
Was this helpful? Need more help?
Leave a comment or a question below. You can also join
the chat on Discord or
ask questions on StackOverflow.
Version
Dependencies
- @polymer/polymer#^3.0.5
- react#^16.4.2
- react-dom#^16.4.2
- Released
- 2018-08-27
- Maturity
- IMPORTED
- License
- MIT License
Compatibility
- Framework
- Polymer 3.0+
- Browser
- Browser Independent