3 ms·
That’s the plan (and it’s what the blog post says). However both Facebook and large products at other companies have too much code that depends on those lifecy
by danabramov 9y ago
That’s the plan (and it’s what the blog post says).
However both Facebook and large products at other companies have too much code that depends on those lifecycles. Potentially thousands of components. So it’s infeasible to completely deprecate them. At least not within a time frame of a year.
This is why we’re still leaving the “unsafe” aliases in React 17 so that people can opt out of async rendering and keep using those while they’re not ready to migrate.
Since we need some version of the hooks to stay, we need to clearly differentiate them so that new code doesn’t use them. Hence the prefix.