loading...

JavaScript predictions for 2019 by npm

Tomek Poniatowicz on March 20, 2019

The co-founder and CEO of npm during his lecture at the Node+JS Interactive 2018 event made some predictions about there direction the web developm... [Read Full]
markdown guide
 

Sounds like a lot more of 2018 to me.

React sure does enjoy a lot of hype, but according to one recruiter I recently spoke to React only accounts for 7% of job requests flowing through their agency. Survey results, number of Github stars and npm downloads are not great metrics, especially when large corporations can host local npm registries. Does this graph include the downloads in various instances of Artifactory or other local npm registries? It is only a matter of time before React goes the way of the Do Do like other JavaScript libraries before it. The main reasons will most likely be resistance to change and failure to adopt web spec.

IMHO 2019 is the year of Web Components, as Microsoft Edge will be the last evergreen browser to adopt the Custom Elements v1 spec. Web Components largely make UI libraries based on component patterns obsolete, with the exception of how libraries like React make components stateful of course.

Why should a team in 2019 considering how to build UI components use React when a huge chunk of the API for developing a component is baked into the browser with Custom Elements v1? I recently built a micro library that makes Web Components stateful and the entire library bundles down to under 2.3Kb minified.

 

"one recruiter I recently spoke to React only accounts for 7% of job requests flowing through their agency."

Tech stacks can cluster around particular hubs in different cities and countries. I'm in a MERN stack hub here, but in other places you might look at the local market and realise it's all LAMP or the front-end is vanilla JS and jQuery. Had a company present at my bootcamp who used Backbone with no plans to migrate away.

Trends change from place to place.

 

How do you import your library into your web component? By leveraging webpack?

 

What exactly do you mean? If the library is distributed as esm, you would just import the methods you need with import. If the library is distributed as commonjs, you require them. A bundler like Webpack, Rollup, Parcel, or SystemJS would be needed to bundle everything together just like any other JavaScript project.

 

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

 

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

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 ?

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!

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

 

Somebody on your team will bring in TypeScript ...

I guess that’s me 🤷‍♂️

 

I'm a little confused how a 0.005% registry share implies that 2019 is the year of GraphQL. If we extrapolate from some other numbers in the study (React has 0.05% registry share and 60% market share among frameworks) we can gather that about 6% of developers using a framework are also using GraphQL (assuming everyone using GraphQL is using some framework). It seems like this study is seriously overhyping the prominence of GraphQL, and I'm not convinced it'll hit mainstream this year or next.

 

React is a great framework but that doesn't mean it will be the dominant framework based on the number of downloads or GitHub stars, not a valid metric.

I think 2019 is the year of web components and that doesn't mean it will make frameworks obsolete, the reason why I think that check this link for more The deepest reason why modern JavaScript frameworks exist

 

web components doesn't make frameworks obsolete because

"Web components do not provide a solution to this problem (keeping the UI in sync with the state)"

Gotya. thx.

 

What about Vue.js? it's getting more traction every month. What do you think about it?

 

Agree, Vue seems to be a solid alternative to React.

 

I think next year will be the year Typescript really explodes in popularity. Especially with Vue being rewritten in Typescript.

 

This was useful and informative to read. Thanks.

 

i am sure you are right about graphql (btw i havent a clue what it is) but it is popping up in 50% of all my searches for node / express / react / apis so its at the top of my todo list

code of conduct - report abuse