DEV Community

Discussion on: Why would you want to learn ReactJS now?

Collapse
 
jmdejager profile image
🐤🥇 Jasper de Jager

Good article,

What do you think is the biggest selling point of ReactJs VS standard web components?

Collapse
 
frontendengineer profile image
Let's Code

I haven't seen too much topic of Web Components here as the favored JS Libs/Frameworks. I like the idea of web components as a light implementation of components where functionality is encapsulated away from the rest of the code. With that being said, any front end apps can utilize web component on their current apps whether it is written in jquery, react, vue, angular, etc.

Do you have any experience writing web components?

Collapse
 
ivan_jrmc profile image
Ivan Jeremic

No need to use classes.

Collapse
 
frontendengineer profile image
Let's Code

I imagine devs will heavy favor functional components with hooks now.

Classes are just a good option to have for those who are a fan AND could update to the functional coolness right away. I like how ReactJS doesn't force devs to re-write everything just what happened to Angular.

Collapse
 
pmudra profile image
Philipp Mudra

React and Web Components are built to solve different problems.
reactjs.org/docs/web-components.html

React and Web Components are not directly comparable IMO. What could be compared are 1. reusable components done with React or Web Components. Or 2. apps create with Stencil (based on Web Components) or React.

Collapse
 
jmdejager profile image
🐤🥇 Jasper de Jager

Learned something new, thnx! 😊

Thread Thread
 
frontendengineer profile image
Let's Code

that is the beauty of this platform. I learn every time I come here and blog with you smart people. 😃

Collapse
 
frontendengineer profile image
Let's Code • Edited

I have seen Stencil used in my current company. We are currently trying to adapt to it as it is lighter. We don't want to ship our components to include VueJS and its libs to our customers.

Stencil combines the best concepts of the most popular frameworks like Virtual DOM, async rendering, reactive data-binding, typeScript, JSX, and more. Do you have experience working with Stencil?

Thread Thread
 
pmudra profile image
Philipp Mudra

Yes, I am also working on a project where we are using stencil. I am very happy with that decision so far.

Stencil / web components do not work with a virtual DOM as React does, though. Maybe shadow DOM is what you meant 😉

Thread Thread
 
frontendengineer profile image
Let's Code

I read on the site that it does, below are some things I read - stenciljs.com/docs/introduction

Stencil combines the best concepts of the most popular frameworks into a simple build-time tool.

Stencil takes features such as

Virtual DOM
Async rendering (inspired by React Fiber)
Reactive data-binding
TypeScript
JSX
Static Site Generation (SSG)

Thread Thread
 
pmudra profile image
Philipp Mudra

I see, thanks for pointing that out.

Thread Thread
 
frontendengineer profile image
Let's Code

welcome 👍