React 19: All the updates you need to know
In this post, we learn about the new hooks, features, and updates in React 19 along with fireside chat with Josh Goldberg
Burnout in tech is real, and this past month has been incredibly tough for me. From dealing with feelings of failure to managing personal challenges, finding motivation to get out of bed has been a struggle. However, I'm grateful for this community, which inspires me to keep going and continue creating! So, let’s dive into everything that’s changed in React 19. But first, here’s a DevJoke:
DevJoke
Question: Why do fish not like React?
Answer: It has hooks
Know a DevJoke? Send it to me via Github
React 19 - Everything you need to know
New Hooks
React 19 introduces powerful new hooks designed to streamline development, particularly for forms. The useFormStatus
and useActionState
hooks simplify handling form submissions and retrieving data post-submission. These hooks also manage loading states automatically, eliminating the need for manual tracking. Additionally, the useOptimistic
hook enhances user experience by enabling optimistic UI updates. This allows developers to predict and apply UI changes before receiving submitted responses, resulting in a more responsive and seamless experience for users.
New Features
React 19 introduces React Actions, which streamline the handling of user events and application state, enhancing code readability and maintainability. Additionally, the React Compiler plugin automates memoization, reducing the need for manual use of useMemo
and useCallback
hooks and improving application performance. React Server Components have also reached a stable state in React 19.
Updates
React 19 introduces several significant changes. Refs can now be used as props, eliminating the need for forwardRef
. Error handling has been improved to prevent duplicate errors and provide better context. Metadata management is now more flexible, allowing different metadata for various components or pages. Additionally, React 19 enhances stylesheet support, giving developers better control over stylesheet precedence and prioritization.
Top Tech News this month
iPhone 16 launch: iPhone 16 was announced today. Along with a Fusion camera, iPhone 16 will have Apple Intelligence create your own emoji (GenMoji!), proofread emails, change the tone of sentences and summarize your email inbox.
Laravel: Laravel, the PHP framework, took a $57M Series A investment from Accel. Most of the funding will be spent on Laravel Cloud. Having worked with Laravel in the past, I am personally excited about this!
CursorAI: CursorAI is an AI code editor and has been picking up steam in the last month. If you haven’t checked it out, it is $20 / month to try.
Monthly Fireside Chats with Shruti Kapoor: Takeaways
Josh Goldberg, open source maintainer of typescript-eslint joined me on Fireside chat to share insights on transitioning to TypeScript, the importance of open source, and the challenges of being an independent open source developer. Some takeaways -
TypeScript is recommended for projects with multiple files or developers, while vanilla JavaScript may suffice for smaller, single-file projects. Communicating the design and expectations of a project before it is built can be helpful in ensuring clarity and alignment among team members.
Nonviolent communication is a valuable skill for resolving conflicts and fostering productive conversations in open source. Empathy, both intellectual and emotional, is crucial in open source and enterprises to understand and address user needs and issues.
ADHD can manifest differently in individuals, and it's important to understand how it affects one's everyday life and work. Strategies for managing ADHD include finding ways to distribute energy for boring tasks, leveraging dopamine-inducing activities, and building momentum by starting with small, manageable tasks.