DEV Community

loading...

Discussion on: JavaScript predictions for 2019 by npm

Collapse
revskill10 profile image
Truong Hoang Dung

Because I can do SSR with React. Single codebase for both backend and frontend.

Collapse
steveblue profile image
Steve Belovarich

You can SSR Web Components too and still retain isomorphic JavaScript, hell you could use TypeScript on the front end and back end too.

Thread Thread
revskill10 profile image
Truong Hoang Dung

My use of React is because of two things:

  • React Hooks for logic.
  • React Suspense for data fetching.

How do Web Components support these patterns ?

Thread Thread
steveblue profile image
Steve Belovarich

This isn’t a referendum against your use of React. Use whatever library suits the project but be aware JavaScript libraries come and go but W3C spec tends to stick around. Div still going strong after all these years!

Thread Thread
steveblue profile image
Steve Belovarich

But to answer your questions, Custom Elements still have lifecycle hooks and well fetch API is available in evergreen browsers.