One cool thing about working on a web framework is that the tools you use to build a feature might eventually adopt the feature itself. 5.5 years later, in this case.
By the end of 2024, you’ll likely never need these APIs again:
• useMemo, useCallback, memo → React Compiler
• forwardRef → ref is a prop
• React.lazy → RSC, promise-as-child
• useContext → use(Context)
• throw promise → use(promise)
• <Context.Provider> → <Context>
A nice thing about working on the same project for many years is you’re forced to deal with the consequences of bad decisions you made long ago. Really sharpens your instinct for spotting technical debt before it starts accruing.
Tip when evaluating libraries: check if it's blazing fast. If it's fast, but the README doesn't specify whether its fastness is blazing, keep searching. Often you can find a similar library that does the same thing, but blazingly. Blazing means good.
How to Code Split with React Suspense
Coming soon to open source.
We're already shipping a version of this to Facebook employees. The code is sooo much nicer than before.
If you use React, you should be using a React framework. If your existing app doesn't use a framework, you should incrementally migrate to one. If you're creating a new React project, you should use a framework from the beginning.
If you call yourself a programmer, you must be proficient in my particular domain of expertise. I can’t overstate how fundamental it is.
For everything else, it’s totally fine if you have gaps in knowledge or experience! You can learn as you go. Tell the gatekeepers to shove it.