DEV Community

Discussion on: Create Reusable Web Components in HTML

Collapse
 
adham123 profile image
adham-123

So basically it's similar to what you can do in reactjs components. But without using reactjs. Though i think reactjs is better for this task.

Collapse
 
tufik2 profile image
Tufik Chediak Sanchez • Edited

Yes, but if you like the reactjs concept of fast implementation, don't update the DOM manually and made update automatically only when it is required or for any reason requires use vanilla js, can get advantage of that... Also there is another uses cases:

  1. Faster performance, use realDOM instead virtualDOM, also is vanilla javascript and starndard code.
  2. You can create your component library and re-use that after in any framework (react, angular, svelte, etc) due is pure javascript, no dependencies.
  3. No needed transpile code or make any configuration.
  4. Sizing.