On April 12, 2017, Leland Richardson who then worked at Airbnb in its mobile development efforts using React Native tweeted the following:
While predictions can carry optimism, most did agree with two of the three elements of this prediction back in 2017.
The controversial prediction was using React in a strongly typed language.
The 2021 React Summit Panel
At the panel, we discussed a few important points, however, I felt that much more could have been said of which time simply did not allow us to. Thus, I am writing this piece to bring you more information.
What 2017 Looked Like
To understand Leland Richardson’s view I think it is important for me to explain what was happening in 2017.
And TypeScript was not as popular as it is today, specially with the React crowd, “pre-2017ish” TypeScript was used more with Angular projects. For React, Flow's default support made it easier to opt into Flow instead if you wanted static types. Further, ReasonML had recently been announced and had a lot of hype from early adopters.
The first prediction mentioned how React would still be popular in 2019. This was certainly the most likely event to happen since React had in 2017 recently taken the throne.
Interesting enough, right around 2019 Svelte does get more attention. Nevertheless, despite some advocating for its compiler advantages and great developer experience, Svelte has not dethroned React.
However, at the end of 2018 something does happen which could change the course of React. React Hooks are released.
Openning for me to promote another blogpost I have 😅: why were hooks created?
The advent of hooks takes React into a new direction that could potentially damage its popularity.
- Overly complex.
- Hard to scale since you lose the mental model, clarity, and traceability of lifecycle methods.
- Higher coupling of business logic with React.
- Too magical.
At the end, React hooks created stateful and effectful functional components, which bothered the FP purist crowd, but satisfied the pragmatist crowd because it was simply less code and more practical to use.
But, no matter what, it seems there will always be a “against it” crowd. Before React hooks, class components and JSX were the main targets. I guess it only becomes a problem for the framework when you have more on the “against it” crowd.
And despite us being at a React conference, when we polled the event about other frameworks we saw how they continue ubiquitious.
React Native’s Popularity
React Native on the other hand, did not in 2019 have an absolute reign.
Leland worked at Airbnb while its mobile division used React Native, and concidentially or not to Leland’s prediction Airbnb actually sunsets React Native usage in 2018.
Further, in December 4th, 2018 Flutter announces its 1.0 version making everyone question if React Native is the best approach to cross-platform. This is followed by a few interesting companies annoucing they will use Flutter, most remarkably Alibaba and Nubank (Brazilian Fintech worth billions).
Strongly Typed Languages
The last prediction was about the usage of React in a strongly typed language.
First, we need to understand what “strongly typed language” actually means, and unfortunately even the definition we get from Wikipedia is not very clear:
Others in the same thread mentioned Elm, however, Elm has its own UI framework so it does not apply to this prediction. (And Elm has not gained mass adoption despite Richard Feldman’s efforts 😅)
But, what has happened?
TypeScript has gotten mass adoption.
94% of the developers watching React Summit 2021 said they use TypeScript with React.
But, is TypeScript a strongly typed language?
First, since the definition of strongly typed is up for interpretation it becomes hard to straight up answer yes or no. The following thus is a personal take.
For me it is not.
TypeScript intentionally makes design decisons that results in an unsound type system.
Ryan Cavanaugh, Engineering Lead for TypeScript, openly says you should look for an alternative if you want a sound type system.
When Orta talked about why TypeScript is popular he mentions the caveat that TypeScript only aims to “feel correct in a lot of case” opposed to "being correct".
What Will 2025 Look Like?
I think React will still be widely used. We are likely to see another UI framework gain ground with a similar mental model of components. I do think there is an interesting shift from runtime frameworks to compiler frameworks like Svelte.
For React Native, it is losing ground to Flutter because it has no intention of becoming a complete SDK for cross-platform development, plus in my personal opinion Facebook’s strategy of having an internal non-opened “Facebook-First-Approach” to developing React Native is not ideal for the external users. Of course, we do see large enterprises using React Native, nevertheless, these companies have the budget and ability to easily move away from React Native if they decide.
Strongly typed languages won’t go anywhere. I much prefer working with a strictly typed language like OCaml, but it is a niche in which the advocates for it will continue to exist, but at least in the near future it will not become mainstream.
Tejas also posted a blogpost about Leland’s prediction prior to our panel which you can find it here.
This was a large post, but I totally enjoyed writing it and I hope you enjoyed reading it. Thank you.