They made React great again?
Skills:
JavaScript Fundamentals80%
Key Takeaways
The video discusses the new features and improvements in React 19, including a compiler, simplified code, and improved developer experience, as well as comparisons to other JavaScript frameworks like Svelte, Vue, and Angular.
Full Transcript
a few days ago a shocking new blog post from the reactjs team dropped as a react hater I hate to say it but they fixed react I tried to let the hate flow through me but the react team made some brilliant moves that will dramatically improve the developer experience just when you thought react had become the new jQuery and the JavaScript framework wars were coming to an end the react team has Unleashed their secret weapon a compiler and in today's video we'll find out what that word means it is February 26 2024 and you're watching the code report speaking of jQuery one thing that you may have missed is that after nearly a decade of anticipation jQuery just announced version 4.0 it got rid of a bunch of stuff made obsolete by the JavaScript language itself dropped ie1 support and migrated to es modules most frontend developers nowadays are too smug and arrogant to use jQuery but this is great news for the millions of websites out there that still use it the big news though is that reactjs is getting a compiler meta is already using this compiler in production to power Instagram and will likely bring solid performance improvements but most importantly it will simplify the code we write as developers Developers L react code is pretty ridiculous compared to Frameworks like view felt and solid like imagine we have some state that needs to be computed into another value we can do it like this in react but that value will be unnecessarily recomputed every time the component reeners it's inefficient to address this react provides a hook called use memo memo means memoization which itself means remember it wraps the computation in another function which will only run when the state that it's dependent on changes which has to be explicitly put in this array if we look at all the other Frameworks though they don't do stuff like this like in view we have this computed function but there's no need to include that dependency array and in spell 3 it's even more simple with the dollar sign syntax although it's being replaced with a rune in spel 5 the reason these Frameworks can let you write more simplified code is because they have a compiler unlike react which is purely runtime based they look at your code in advance to figure out where the reactivity is and bundle that into the final product that goes to the browser but now that react is getting its own compiler it means hooks like use memo and use callback are a thing of the past and that's huge because not only is the code ugly as as hell but it also removes the mental boiler plate of asking the question to memoize or not to memoize and they confirmed my conspiracy theory that react intentionally adds bad apis like this just to look like Geniuses when they remove them later on but use memo is not the only bad feature going away another thing you won't need in the future is forward ref which creates a higher order component when you need to expose a Dom node to the parent instead ref will just be a prop so you can easily access it without having to wrap another function that's an easy win but a more controversial feature is server actions you can already use actions in nextjs and many have described the developer experience as being like PHP but without Lambos the general idea though is that react handles the data submission cycle for you from client to server and then back again what's cool about this is react provides hooks like use form status or use form state to easily handle the data in a form but then alongside that you have hooks like use optimistic to get that Ultra fast Firebase like feel on any backend database the UI updates instantly based on the expected change then in the rare case it fails it reverts back but another thing that sucks about react is working with promises in react server components like in nextjs you can use async await to fetch data directly in a component that's awesome but you can't do it in a client side component and you still can't in react 19 but you can use the use hook which is the next best thing it works on both promises and react context which means it makes the Ed context hook obsolete because unlike used context use can also be used inside of loops and conditionals but using use allows you to use the value of a resolved promise directly in the UI now a promis is asynchronous and its value is initially pending so you can handle the loading state by wrapping it in a suspense boundary and it might also reject and throw an error in which case you can wrap it in an error boundary I don't really love this code myself but it's way better than the common approach of resolving a promise with the use effect hook bottom line is that these are some huge improvements for react what's funny though is that if we take a step back all the major Frameworks are starting to look identical and have all copied each other's abstractions leading to nearly identical apis just with things named slightly different as a civilized society it's about time we decide on the one true framework then we build that framework into the browser to put an end to this Bloodshed once and for all this has been the code report thanks for watching and I will see you in the next JS one
Original Description
Let's take a first look at React 19 and a variety of changes will improve the developer experience. We compare React's changes to other JavaScript frameworks like Svelte, Vue, and Angular.
#webdevelopment #programming #thecodereport
💬 Chat with Me on Discord
https://discord.gg/fireship
🔗 Resources
React Blog Post https://react.dev/blog/2024/02/15/react-labs-what-we-have-been-working-on-february-2024
React for the Haters https://youtu.be/HyWYpM_S-2c
Fireship Next.JS course https://fireship.io/courses/nextjs/
🔥 Get More Content - Upgrade to PRO
Upgrade at https://fireship.io/pro
Use code YT25 for 25% off PRO access
🎨 My Editor Settings
- Atom One Dark
- vscode-icons
- Fira Code Font
🔖 Topics Covered
- What's new in react version 19
- React vs Vue
- React vs Svelte
- React 19 compiler
Watch on YouTube ↗
(saves to browser)
Sign in to unlock AI tutor explanation · ⚡30
Playlist
Uploads from Fireship · Fireship · 0 of 60
← Previous
Next →
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
Angular 4 Development and Production Environments with Firebase
Fireship
OAuth with Angular and Firebase Tutorial
Fireship
Anonymous Authentication with Angular and Firebase - Lazy Registration
Fireship
Angular Router Guards for Firebase Users
Fireship
Angular Firebase CRUD App with NoSQL Database Tutorial
Fireship
Upload Files from Angular to Firebase Storage
Fireship
How to Deploy an Angular App to Firebase Hosting
Fireship
Sharing Data between Components in Angular
Fireship
Loading Spinners for Asynchronous Firebase Data
Fireship
Angular 4 Transactional Email with Google Firebase Cloud Functions
Fireship
Firebase Database Rules Tutorial
Fireship
Autocomplete Search with Angular4 and Firebase
Fireship
Reddit Inspired Upvoting System with Angular and Firebase NoSQL
Fireship
Angular Drag-and-Drop File Uploads to Firebase Storage
Fireship
Text Translation with Firebase Cloud Functions onWrite and Angular 4
Fireship
Custom Usernames with Firebase Authentication
Fireship
Twitter-Inspired Follow Unfollow Feature with Firebase and Angular 4
Fireship
Simple Pagination with Firebase and Angular 4
Fireship
How to Connect Firebase Users to their Data - 3 Methods
Fireship
Add Toast Message Notifications to your Angular App
Fireship
Facebook-Inspired Reactions System with Angular and Firebase
Fireship
Learn NgModule in Angular with Examples
Fireship
Lazy Loading Components in Angular 4
Fireship
Stripe Checkout Payments with Angular and Firebase - Part 1
Fireship
Process Stripe Payments with Firebase Cloud Functions - Part 2
Fireship
Selling Digital Content in Angular with Stripe Payments - Part 3
Fireship
Angular 4 Full Text Search with Algolia - Part 1
Fireship
Algolia with Firebase Cloud Functions - Part 2
Fireship
Firebase Phone Authentication in Angular 4
Fireship
Top 7 RxJS Concepts for Angular Developers
Fireship
Learn Angular Animations with 5 Examples
Fireship
Advanced Firebase Data Filtering (Multi-Property)
Fireship
Realtime Maps with Mapbox + Firebase + Angular
Fireship
Angular Reactive Forms with Firebase Database Backend
Fireship
Send Push Notifications in Angular with Firebase Cloud Messaging
Fireship
Top 7 Ways to Debug Angular 4 Apps
Fireship
Infinite Scroll with Angular and Firebase
Fireship
Use TypeScript with Firebase Cloud Functions
Fireship
Realtime Graphs and Charts with Plotly and Firebase
Fireship
Role-Based User Permissions in Firebase
Fireship
User Presence System in Realtime - Online, Offline, Away
Fireship
Location-based Queries with GeoFire and Angular Google Maps
Fireship
Angular ngrx Redux Quick Start Tutorial
Fireship
Angular Ngrx Effects with Firebase Database
Fireship
Progressive Web Apps with Angular
Fireship
Angular Ngrx with Firebase Google OAuth User Authentication
Fireship
RxJS Quick Start with Practical Examples
Fireship
Send SMS Text Messages with Twilio and Firebase
Fireship
Firebase Database Performance Profiling
Fireship
Native Desktop Apps with Angular and Electron
Fireship
Subscription Payments with Stripe, Angular, and Firebase
Fireship
Firestore with AngularFire5 Quick Start Tutorial
Fireship
Angular HTTP Client Quick Start Tutorial
Fireship
Google Sign-In with Firestore Custom User Data
Fireship
Star Review System from Scratch with Firestore + Angular
Fireship
Angular Chatbot with Dialogflow (API.ai)
Fireship
Learn @ngrx/entity and Feature Modules
Fireship
Infinite Scroll Pagination with Firestore
Fireship
Faster Firestore via Data Aggregation
Fireship
Contentful - CMS for Angular Progressive Web Apps
Fireship
More on: JavaScript Fundamentals
View skill →Related Reads
📰
📰
📰
📰
I Spent Two Years Maintaining a React SPA. HTMX Rebuilt It in a Week
Medium · Programming
The 5 Levels of Front End Engineering (And Where Most Developers Get Stuck)
Medium · Programming
Browser-Based PDF Editing with Vue 3 and pdf-lib
Dev.to · sunshey
Say Goodbye To Electron?
Medium · Programming
🎓
Tutor Explanation
DeepCamp AI