React's New Controversial Override
Unlock all features
FREE: Get instant access to 10 AI summaries, chats, or transcripts per day.
Unlock all features
FREE: Get instant access to 10 AI summaries, chats, or transcripts per day.
Unlock all features
FREE: Get instant access to 10 AI summaries, chats, or transcripts per day.
Unlock all features
FREE: Get instant access to 10 AI summaries, chats, or transcripts per day.
Unlock all features
FREE: Get instant access to 10 AI summaries, chats, or transcripts per day.
Related videos
My new app is really stupid (I wrote none of the code)
Theo - t3․gg
58.4k views
React got hacked. It's really, really bad.
Theo - t3․gg
112.4k views
The Future of React
Theo - t3․gg
50.7k views
Amazon bets big on React Native
Theo - t3․gg
48.2k views
React is killing the web
Theo - t3․gg
59.9k views
Why every dev should avoid React
Theo - t3․gg
81.2k views
React feels insane
Theo - t3․gg
90.4k views
It’s actually over now
Theo - t3․gg
199.8k views
I never saw this coming
Theo - t3․gg
157.0k views
The Truth About React Native
Theo - t3․gg
103.2k views
Top Comments (10)
They should instead add their own date that explicitly specifies server or client date and warn devs in the console if the regular date is used.
Still just a library btw.
Why does "it suck" that the serverside Date() spits out it's current date and the clientside Date() (if "use client" is stated) spits ITS current date out? To me this is expected... No? Like, I get that it's unfortunate and that red equals bad, but... that's just SSR things for you, no...? I feel like every potential change to "fix" this just introduces more harm than good. But oh well, we will see...
Polyfills usually have checks that will apply them only if the target functionality is absent. In other words their initialization looks something like this: *window.something = checkForSomethingFunctionalitySomehow() ? window.something : somethingPolyfill;* At least its definetly how Array and Object static and prototype methods are applied, which makes sense, especially from the point of performance. Wouldn't it make more sense to create a separate *React.Date* object that would work the same way as original Date plus hydration fix? Adding *import { Date } from "react"* should be a pretty easy fix and most importantly its very obvious for everyone. I remember when I worked with Angular 1, provided its own function, like setTimeout, that could be injected into components and services via dependency injection.
Hurray, new footguns to stick in the holes in the old ones shot 🙄
Next up: We’re patching Math.random()
It's stupid. It solves one of many issues, because you're hydrating with non-idempotent logic. What's next? Are they just going to patch anything that isn't idempotent lmao. SOLVE THE FUNDAMENTAL ISSUE.
Nice, so they are going to break formatting by locale in the browser and timezones...
They should just add a `useDate` hook that you can use that just gives you a date object with the date that was created on the server.
Aren't polyfill by nature only patches when the feature does not exist? While technically does the same patching, it feels different as by design its meant to be not used when possible.
Unlock the Data Inside
Turn Videos into Knowledge
- Get FREE 10/day: transcripts, summaries, chats
- Chat with videos, export text & PDF
- $1 free API credit for RAG, chatbots & research
Free forever plan • All features unlocked
Top Comments (10)
They should instead add their own date that explicitly specifies server or client date and warn devs in the console if the regular date is used.
Still just a library btw.
Why does "it suck" that the serverside Date() spits out it's current date and the clientside Date() (if "use client" is stated) spits ITS current date out? To me this is expected... No? Like, I get that it's unfortunate and that red equals bad, but... that's just SSR things for you, no...? I feel like every potential change to "fix" this just introduces more harm than good. But oh well, we will see...
Polyfills usually have checks that will apply them only if the target functionality is absent. In other words their initialization looks something like this: *window.something = checkForSomethingFunctionalitySomehow() ? window.something : somethingPolyfill;* At least its definetly how Array and Object static and prototype methods are applied, which makes sense, especially from the point of performance. Wouldn't it make more sense to create a separate *React.Date* object that would work the same way as original Date plus hydration fix? Adding *import { Date } from "react"* should be a pretty easy fix and most importantly its very obvious for everyone. I remember when I worked with Angular 1, provided its own function, like setTimeout, that could be injected into components and services via dependency injection.
Hurray, new footguns to stick in the holes in the old ones shot 🙄
Next up: We’re patching Math.random()
It's stupid. It solves one of many issues, because you're hydrating with non-idempotent logic. What's next? Are they just going to patch anything that isn't idempotent lmao. SOLVE THE FUNDAMENTAL ISSUE.
Nice, so they are going to break formatting by locale in the browser and timezones...
They should just add a `useDate` hook that you can use that just gives you a date object with the date that was created on the server.
Aren't polyfill by nature only patches when the feature does not exist? While technically does the same patching, it feels different as by design its meant to be not used when possible.