• <tfoot id='VbBAl'></tfoot>

      <i id='VbBAl'><tr id='VbBAl'><dt id='VbBAl'><q id='VbBAl'><span id='VbBAl'><b id='VbBAl'><form id='VbBAl'><ins id='VbBAl'></ins><ul id='VbBAl'></ul><sub id='VbBAl'></sub></form><legend id='VbBAl'></legend><bdo id='VbBAl'><pre id='VbBAl'><center id='VbBAl'></center></pre></bdo></b><th id='VbBAl'></th></span></q></dt></tr></i><div id='VbBAl'><tfoot id='VbBAl'></tfoot><dl id='VbBAl'><fieldset id='VbBAl'></fieldset></dl></div>

      <small id='VbBAl'></small><noframes id='VbBAl'>

    1. <legend id='VbBAl'><style id='VbBAl'><dir id='VbBAl'><q id='VbBAl'></q></dir></style></legend>
        <bdo id='VbBAl'></bdo><ul id='VbBAl'></ul>

        真的有必要制作和使用新的自定义元素和 Web 组件(HTML 标签)吗?

        Is it really necessary to make and use new custom elements and web components (HTML tags)?(真的有必要制作和使用新的自定义元素和 Web 组件(HTML 标签)吗?)

      1. <small id='wpRwX'></small><noframes id='wpRwX'>

            <tbody id='wpRwX'></tbody>

                <tfoot id='wpRwX'></tfoot>
                  <bdo id='wpRwX'></bdo><ul id='wpRwX'></ul>
                  <legend id='wpRwX'><style id='wpRwX'><dir id='wpRwX'><q id='wpRwX'></q></dir></style></legend>
                  <i id='wpRwX'><tr id='wpRwX'><dt id='wpRwX'><q id='wpRwX'><span id='wpRwX'><b id='wpRwX'><form id='wpRwX'><ins id='wpRwX'></ins><ul id='wpRwX'></ul><sub id='wpRwX'></sub></form><legend id='wpRwX'></legend><bdo id='wpRwX'><pre id='wpRwX'><center id='wpRwX'></center></pre></bdo></b><th id='wpRwX'></th></span></q></dt></tr></i><div id='wpRwX'><tfoot id='wpRwX'></tfoot><dl id='wpRwX'><fieldset id='wpRwX'></fieldset></dl></div>
                • 本文介绍了真的有必要制作和使用新的自定义元素和 Web 组件(HTML 标签)吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  I'm currently learning Front-end web development and the difference between Vanilla JavaScript, frameworks and libraries (React for example). Now I'm familiar with web components for making new custom HTML tags. As I know, React is made for the same purpose, but when I visited the Instagram website (the first website that uses React that comes to mind) and looked at the HTML code, I didn't find any custom HTML element, in fact, most of the elements are made of "div"s tags. If a complex social media website like Instagram isn't made of custom elements, then who uses them and why?

                  解决方案

                  React is a totally different beast, dating back almost a decade. It was developed by Facebook because TOO many teams were doing TOO many updates in the same DOM. So they came up with a virtual DOM where all required DOM updates are merged before writing to the Browser DOM.

                  Works great for Facebook. Newer technologies like the Custom Elements API and Svelte (Compile, don't Transpile) have proven it is no longer the best solution.

                  Reacts outdated technology now scores a meager 71% on https://custom-elements-everywhere.com/

                  React and W3C Custom Elements are not friends

                  Because the Green DOM elements are not tracked by React.

                  And if you want to mix Green and Yellow you have to basically re-write/wrap each and every component into React syntax. Because React not only does DOM Elements different, but also does DOM Events different.

                  The future

                  This makes an interesting future: React and the W3C standard are diverging.

                  And the W3C standard is defacto set by Browser vendors,
                  not by the W3C, as we learned from the never implemented ECMAScript 4 saga (1999 - 2008)

                  So its

                  Apple (Safari) + Mozilla (FireFox) + Google/Microsoft (Chromium/Chredge)
                  versus
                  Facebook (No browser!)

                  'problem' with the W3C is all members have to agree on a standard; that is why it took years for the Custom Elements API to mature... and React got a head start

                  Facebook does now "own" 60% of the developers market...
                  but hey,
                  Microsoft had 90% of the Browser market... once,
                  and Flash was installed on nearly every device....once

                  The Custom Elements API will exist for as long as ECMAScript runs in the browser

                  It is not a framework or library! It is a language construct.
                  Not learning Custom Elements is like saying:

                  I am not learning Set or Map, I can do everything with Arrays

                  Older rant at: Web components - Services / non html components

                  Or believe the 2020 Front-End Survey:

                  这篇关于真的有必要制作和使用新的自定义元素和 Web 组件(HTML 标签)吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Pause youtube video, youtube api(暂停 youtube 视频,youtube api)
                  Youtube iframe api not triggering onYouTubeIframeAPIReady(Youtube iframe api 未触发 onYouTubeIframeAPIReady)
                  How can I stop a video with Javascript in Youtube?(如何在 Youtube 中停止使用 Javascript 的视频?)
                  Embed YouTube video - Refused to display in a frame because it set #39;X-Frame-Options#39; to #39;SAMEORIGIN#39;(嵌入 YouTube 视频 - 拒绝显示在框架中,因为它将“X-Frame-Options设置为“SAMEORIGIN)
                  How to call Greasemonkey#39;s GM_ functions from code that must run in the target page scope?(如何从必须在目标页面范围内运行的代码中调用 Greasemonkey 的 GM_ 函数?)
                  How do you mute an embedded Youtube player?(如何使嵌入式 Youtube 播放器静音?)

                    <small id='NdpaS'></small><noframes id='NdpaS'>

                    • <i id='NdpaS'><tr id='NdpaS'><dt id='NdpaS'><q id='NdpaS'><span id='NdpaS'><b id='NdpaS'><form id='NdpaS'><ins id='NdpaS'></ins><ul id='NdpaS'></ul><sub id='NdpaS'></sub></form><legend id='NdpaS'></legend><bdo id='NdpaS'><pre id='NdpaS'><center id='NdpaS'></center></pre></bdo></b><th id='NdpaS'></th></span></q></dt></tr></i><div id='NdpaS'><tfoot id='NdpaS'></tfoot><dl id='NdpaS'><fieldset id='NdpaS'></fieldset></dl></div>

                      <tfoot id='NdpaS'></tfoot>
                        <tbody id='NdpaS'></tbody>
                        <legend id='NdpaS'><style id='NdpaS'><dir id='NdpaS'><q id='NdpaS'></q></dir></style></legend>

                        • <bdo id='NdpaS'></bdo><ul id='NdpaS'></ul>