The Exciting Journey Ahead for React.js
I would describe the journey of learning Javascript like shopping at Ikea. It is more like wading through a vast collection desks, chairs and Billy Bookcases that come in white; or maybe one day in (product) red. You can put it all together anyway you want. You are even encouraged to even make your own; with endless syntax errors and side effects. When I finally started using React, I just realised why it is one of the most popular frameworks today.
With the release of React 18, last year, they have made it even easier to use and solve things that could easily trigger an individual on an 12 hour coding sprint on 6 cans of Red Bull.
We now have hooks as default! Hooks were first introduced in React 16.8 and have become increasingly popular in the past two years. Although class-based components are still supported, hooks are now the default and are widely used in most projects.
We also have two new hooks, useTransition and useDeferredValue, which are tools for improving the perceived performance of a website by avoiding blocking UI states and ensuring smooth updates and changes. It also adds new capabilities to Suspense, which is a component that you can wrap around your components to show a fallback while waiting for code to download or data to be fetched. However, the Suspense for data fetching feature is still in experimental mode and is not easily implementable on its own; use libraries that integrate with it, like React Query or Facebook's relay package.
Another exciting initiative is on server components. The idea behind server components is that you can have some components that only run on the server and never reach the client. This means that you can perform server-side logic in them, like reaching out to a database, and you can ship less client-side code to your users. Server components are still experimental, but frameworks like NextJS are using them in their new features, which allows you to build more complex full-stack applications and move more code back to the server.
领英推荐
The trend of moving code back to the server has several important implications. For example, it means simpler client-side code, less use of useState and useEffect, and less reliance on Redux because there is less state to manage on the client side and fewer side effects to run if you're doing more work on the server.
React is more important than ever, but it's also more important than ever to learn another Meta framework like NextJS or Remix to move more code back from the client to the server. The trend of going back to the server for certain tasks simplifies client-side code and allows for the building of more complex full-stack applications.
Despite all things going on at Meta, it's cool to see them continue to evolve and drive the software industry with these quality-of-life changes.
{shamelessplug} Are you open to new opportunities in Hong Kong? Feel free to reach out to me or to get an update on the IT job market. ??
Web developer/Frontend Engineer
2 年Definitely want to get updated for IT job market.