DEV Community

Cover image for JavaScript predictions for 2019 by npm
Tomek Poniatowicz for GraphQL Editor

Posted on • Updated on • Originally published at blog.graphqleditor.com

JavaScript predictions for 2019 by npm

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 development sector is heading, the future of JavaScript and more. He also covered some development tools used within the npm community, discussed best practices, rising-star frameworks and those fading into oblivion. The predictions were made based on insights reflect feedback from 16,000 developers on JavaScript usage trends and best practices and the top four predictions are:

You will abandon one of your current tools

Nothing lasts forever and this is very true for frameworks and tools in JavaScript. The average peak phase of popularity lasts from three to five years and is followed by a slow decline, as organizations have to maintain their existing applications, but have already moved to newer frameworks for new projects. For developers, this basically means that it is better to learn new frameworks than to stick to their current tools too hard.

Somebody on your team will bring in TypeScript ...

... And you should be thankful! A survey of more than 16,000 developers showed that 46% of respondents used Microsoft's TypeScript, a JavaScript superset that compiles to regular JavaScript. The main reason for this conversion rate by enthusiasts may be the additional security TypeScript provides by type-checking. Adopting TypeScript in 2019 can give you real value, especially if you are a member of a larger team.

React will be the dominant framework

Despite the fact that its growth has slowed down during 2018, React still continues to dominate the web scene. The 60% of npm survey respondents said they are using React. The npm predicts that in 2019 more people will use React for building web applications which will lead to more tutorials, cases and bug's being fixed.


Source: This year in JavaScript by npm

You’ll need to learn GraphQL

2019 will be the year of GraphQL. There is a strong likelihood that developers will use it in new projects in 2019 and afterward. GraphQL, tracked by its most popular client library Apollo, continues to explode in popularity. GraphQL it’s going to be a technical force to reckon within 2019.

Source: This year in JavaScript by npm

Top comments (18)

Collapse
 
steveblue profile image
Stephen Belovarich • Edited

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.

Collapse
 
sally profile image
Sally • Edited

"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.

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
Stephen 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
Stephen Belovarich • Edited

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
Stephen Belovarich

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

Collapse
 
seanmclem profile image
Seanmclem

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

Collapse
 
steveblue profile image
Stephen Belovarich

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.

Collapse
 
andrzejchmura profile image
Andrzej Chmura

Somebody on your team will bring in TypeScript ...

I guess that’s me 🤷‍♂️

Collapse
 
nepeckman profile image
nepeckman

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.

Collapse
 
imm9o profile image
Islam Muhammad • Edited

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

Collapse
 
suntong profile image
suntong • Edited

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.

Collapse
 
alanbosco profile image
Alan Bosco

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

Collapse
 
tomekponiat profile image
Tomek Poniatowicz

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

Collapse
 
toastking profile image
Matt Del Signore

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

Collapse
 
osde8info profile image
Clive Da

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