Pros and Cons of Facebook’s React vs. Web Components (Polymer) [closed]
Pros and Cons of Facebook’s React vs. Web Components (Polymer) [closed]
Pros and Cons of Facebook’s React vs. Web Components (Polymer) [closed]
If you use SystemJS then you can load assets by using plugins: // Will generate a <link> element for my/file.css System.import(‘my/file.css!’) .then(() => console.log(‘CSS file loaded’)); Alternatively, you can use an import statement. This will make sure that the CSS file is loaded before the your script executes: import ‘my/file.css!’; Finally, you can retrieve the … Read more
Private resources should be installed in your component folder and used directly. But shared resources, those resources that other components my also want to use (like marked), should be handled as dependencies. We suggest two conventions for handling shared dependencies: always use the canonical path which is ../<package-name> (you did this already). Polymer by convention … Read more
All browsers support a finite list of HTML elements which are considered as “known”. Elements which are unknown (e.g <city>, <person>) do not generally throw errors with the HTML parser in modern browsers and instead inherit from HTMLUnknownElement. In older versions of IE however, such elements would be inserted into the DOM as an empty … Read more
I had the same issue and I solved the problem via adjusting the default theme. Add the following code to a file (name of your choice).js import { createMuiTheme } from ‘@material-ui/core/styles’; const theme = createMuiTheme({ typography: { button: { textTransform: ‘none’ } } }); export default theme; You can then add the file to … Read more
As Joel H. points out in the comments, Chrome has since deprecated the /deep/ combinator, and it gives a syntax error in IE. HTML5 Web Components offer full encapsulation of CSS styles. This means that: styles defined within a component cannot leak out and effect the rest of the page styles defined at the page … Read more
You’re not the first to ask this question 🙂 Let me clarify a couple of things before getting to your questions. Polymer’s webcomponents.js is a library that contains several polyfills for various W3C APIs that fall under the Web Components umbrella. These are: Custom Elements HTML Imports <template> Shadow DOM Pointer Events others The left-nav … Read more