|
|
|
|
|
by grayrest
4383 days ago
|
|
Haven't tried it but you can integrate React with pretty much anything. Looking at the Polymer lifecycle methods[1], I'd start by trying a `React.renderComponent` in Polymer's `domReady` callback for an element and then setState/setProps/forceUpdate in the `attributeChanged` callback. [1] http://www.polymer-project.org/docs/polymer/polymer.html#lif... That said, I don't expect it to be common since you'd basically be building a React component with a Polymer shim and getting almost no leverage out of Polymer. I suppose you could write some code to parse out the html template and turn it into React.DOM equivalents but that seems like a lot of effort. All React integrations I've seen are the result of introducing React into a legacy codebase or they're using React on a component that's rendering a very large DOM subtree and taking advantage of React's O(N_view) instead of O(N_model) scaling and batched updates for perf wins over current KVO techniques. |
|