TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Show HN: React 0.12 renders to Web Components

45 pointsby OlavHNover 10 years ago

5 comments

ricticover 10 years ago
This seems cool, but I&#x27;m a bit confused (background: I&#x27;ve been working with web components and polymer for the past couple of months, but have only read a couple articles on React, apologies if this is a dumb question).<p>This says that react renders to web components, but it looks to me like react is just adding a web component to the area of the DOM that it&#x27;s controlling. Is more going on here? e.g. doing the same thing with jquery:<p><pre><code> $(&#x27;&lt;core-icon&gt;&#x27;).attr(&#x27;src&#x27;, &quot;&#x2F;&#x2F;www.polymer-project.org&#x2F;images&#x2F;icons&#x2F;android.svg&quot;).appendTo(&#x27;#jquery-root&#x27;); </code></pre> Is the idea that React is doing data binding to the src attribute?
评论 #8573892 未加载
Bahamutover 10 years ago
How would data syncing work between React and the components seem to be a more important question. One doesn&#x27;t really need React to create a web component in this example.
bwhittyover 10 years ago
Polymer uses standard 2-way data binding. How does this fit into React&#x27;s flow? I&#x27;d love to see an implementation of Polymer using the Flux architecture.
评论 #8573350 未加载
评论 #8573201 未加载
miralabsover 10 years ago
I don&#x27;t get the advantage of this. What is the diff with $(&quot;&lt;core-icon&gt;&quot;)... call?
werdnapkover 10 years ago
Why does the icon src need to be specified twice?
评论 #8573214 未加载