Open wSedlacek opened 2 years ago
Thank you very much for this!
As mentioned on Discord, I'll be busy preparing a talk for the next two weeks so I can't immediately jump on it.
Some quick impressions:
@types/react
patchfile.package-lock.json
diff easily because the lockfile format changes. Can we do this PR using an older npm version to simplify the diff? That, or (before this PR) we can reinstall the existing deps using a newer npm version to get the lockfile in line.node.getAttribute()
and node.setAttribute()
to direct property accesses related to React 18?sample/app
was moved to sample/src
. Again, this seems unrelated to React 18 and is probably to do with Webpack 5. I've done that migration already on the feat/v8
branch (which I'd intend to merge before tackling React 18 support), so I should probably just merge that to master at this point to reduce the diff from this incoming PR.I notice that these lines were removed from HostConfig.ts
:
scheduleDeferredCallback: scheduler.unstable_scheduleCallback,
cancelDeferredCallback: scheduler.unstable_cancelCallback,
// @ts-ignore not in typings
schedulePassiveEffects: scheduler.unstable_scheduleCallback,
cancelPassiveEffects: scheduler.unstable_cancelCallback,
// @ts-ignore not in typings
shouldYield: scheduler.unstable_shouldYield,
now: scheduler.unstable_now,
I originally had to put them in to support hooks (React 16, perhaps?). Obviously they were all marked as unstable, so maybe things are done differently now, but do hooks still work?
shouldDeprioritizeSubtree
was removed from HostConfig.ts
as well; what's the reasoning behind that?So I think, in summary, the actionables are:
feat/v8
(or wait for feat/v8
to be merged into master, then rebase onto that) as that will be landed first;I understand it's a lot of work, but thank you very much for taking the time to look into it!
This adds primilar support for React 18. It is NOT thoroughly tested and needs more extensive test cases. It is still using the Legacy Root