It is June 10th 2023 and you are watching the code report
There’s millions of great JavaScript Frameworks in the world today but the most popular choice is still react even though we have faster Alternatives like solid preact and quick that also use jsx one of react’s original Innovations was the Virtual Dom but many modern Frameworks have moved away from this approach and Rich Harris the creator of svelte once called it pure overhead despite this react will likely still be used on websites hundreds of years after we’re all dead but today I have some good news a recent high school graduate named Aiden by just improved reacts performance by 70 percent with million JS which provides a hyper optimized virtual Dom and chains the original virtual Dom to the radiator where it can’t cause any problems when I first saw this my initial thought was no way there’s no way a teenager could Outrender an entire team of top tier engineers at meta but there are benchmarks to back up these outrageous claims like on the gold standard framework Benchmark it ranks way higher than react itself and even beats solid.js and it provides a live demo where you can compare react and millions Side by side now it’s important to point out that benchmarks don’t really represent real world use cases and the vast majority of web apps out there will never get to the point where they have rendering issues with a JavaScript framework however it’s always fun to do some premature over optimization anyway But if you’re a highly experienced react developer you might be wondering what is the virtual Dom I’ve never heard of it well to update things in the UI react makes a lightweight copy of the Dom where it can calculate updates faster and then update everything all at once It’s kind of like finalizing all your changes on a blueprint before you go tearing out walls in a building but all this happens at runtime and there’s a lot of unnecessary work trying to figure out what changed million JS takes a more surgical approach by introducing a compiler that can perform static Analysis to figure out exactly where the dynamic data is in advance it creates an edit map to represent the state of the application which can then determine what has changed with far less computation required this approach is inspired by other Frameworks like svelt and solid which also rely on a compiler To achieve these surgical Dom updates and million was also inspired by the prior work of a library called block Dom what’s also cool about million is that it’s only four kilobytes and extremely easy to use use all you do is take an existing react component and wrap it Inside this block function to create a higher order component which will block out the virtual Dom and let million magically take over basically after the component is mounted it makes a reference to the underlying Dom element then does all the subsequent rendering and change detection on its own in Addition it has a built-in 4 component which is used to render a list of blocks pretty simple but before you get too excited the creator of this project admits that it’s not a silver bullet when using blocks you need to follow a specific set of rules and if you break Those rules it’ll revert back to reacts virtual Dom and you’ll lose all your massive gains overall million JS looks like an awesome project but most importantly it gives me hope that gen Z is not actually Tech illiterate and might actually one day be able to fix react this has been the code report Thanks for watching and I will see you in the next one
Did something similar to ensure only the necessary component would update on state change especially with shared props. It’s cool, but as soon as your application is over 30 components or so it’s incredibly complex to manage. Also, fuck redux.
This is from the guy who posted fake benchmarks in the past, no thanks!
anyone know about mikado ??/
Millennials dissing Gen Z for their work ethics and brains will eventually prove wrong. I strongly believe that this generation will definitely achieve great things which the previous generation has failed to achieve whether it's societal or technological.
Moved away from REACT, Angular & Vue many years ago in favor of a relaxed TS/JS MVC design pattern, there was no need to re-invent the wheel, dumb f***s.
Nice GenZ burn at 2:36 😆
This is why web dev is eternally F'd… everything is wrapped inside another wrapper.
React is an extremely slow crap in its core. So it's just very difficult to not make it million times faster lol. Actually, in terms of usability and performance, Svelte JS buried React a looooooooong long time ago.
So far we haven't find any good gen z SE ;( we cannot use "young and dynamic anymore as X and millenials are still dominating.
If you think you are good at something, there will always be an asian who will come and do it better than you…
So it's basically blockdom for react?
Please stop make click-bait videos.
i think we are all, literally all missing the point…
At the end of the day , it's how fast your app loads , not how fast can your CPU render it..
U can make it a billion times faster by using cpp
Isn't this the same what we did 10 years ago with jQuery selectors to manipulate things?
Genius genZ its very rare
2:32 "I am the virtual dom now" 🤣😂🤣😂 I'm dying…
The entire frontend community : We will watch your career with great interest
qwik still beter
Cool 🙂
… have any of you actually tried it? it is FAR from a plug and play solution – apart from the numerous rules you have to follow in blocks, it will completely break with the addition of some third party libraries (like recoil, for example).
horrendous juxtaposition of random unrelated clips
GenZ isn’t all tech illiterate. It’s just 99% of them. 😂
The real question is, why hasn’t everyone already switched to HTMX? It’s how we should be solving the webapp problem. React apps (in my experience) last about 18 months before they need to be totally rewritten again. FE frameworks are not the way to create scalable web apps, most of which are just forms and static data visualisation. Using JSON to drive apps is the flaw, hypermedia should be how you handle your application state, not creating a new application to reimplement what the backend is already trying to do. Maybe one day devs will cotton on to how fundamentally flawed this approach is.
I still believe React should be deprecated. Considering it's structure, I don't think it is logical to avoid Solid, Vue, Svelte, Qwik and go Million. React is a zombie framework, which got created before the Proxy api. All hooks and logical restrictions got implemented by following the non-existing times period. A good software engineer should see this, IMO
I don't think the amount of tech literate people has ever necessarily gone down percentage wise. I'd argue it will only go up and, just like actual literacy, will become a societal norm.
I like that this video has 1 million views
I like vue js more …vue 2 specifically..
the guy that can get jobs that's hiring 18 year olds with 30 years of experience
Biological Artificial Intelligence.
BAI
:}
Even better solution is to delete React and just write HTML5 to begin with. Not only will it render faster, but you don't need building time for something that does not need to build.
Rich Harris is an incompetent bafoon.
So there goes fireship's credibility.
In my eyes anyway.
Optimizations in the framework always make sense. Yes, you can waste time on it, or actually invest it. An often overlooked part of a green future is not computing stuff that's not necessary – Of course, we'll always have to strike a balance here. This makes your app either faster for your client, or keeps their battery running for longer, or makes it work at all in the first place. How's that a bad thing? It's not, it's great.
He used Chad GPT
React is crap
Ah my daily dose of coding. Perfect
How do i use that in my projects?
what is a DOM ?
I know lying in titles is normal nowadays but its still pretty stupid
include the links tot he tools you mention in the description
Gen Z tech illiterate? You mean the people that came out of the womb with a smartphone filtering the nutrients from the umbilical cord? Is this a mildly controversial statements to increase engagement?
90s boy, 1.2 years into coding. Still don't understand how adding things can make things faster.
I hate tech, god damnit stop changing