-
Notifications
You must be signed in to change notification settings - Fork 49.5k
Ship partial-prerendering APIs to Canary #34633
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ship partial-prerendering APIs to Canary #34633
Conversation
ede8cd4
to
8b2cc91
Compare
All OSS builds have these entrypoints now
8b2cc91
to
5bcfccc
Compare
result.prelude.pipe(writable); | ||
}); | ||
expect(getVisibleChildren(container)).toEqual(undefined); | ||
expect(errors).toEqual([]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test used to fail due to prerenderToNodeStream
not existing. Since that API exists everywhere now, the only error happens in onError
calling console.error(postponedValue)
. However, we ignore console.error(someErrorInstance)
in our testing infra and it would take a while to update all the tests to also assert on prod errors.
In dev the test failed because we also called console.error
with the environment name
5bcfccc
to
5ba4156
Compare
5ba4156
to
bdac823
Compare
if (__EXPERIMENTAL__) { | ||
const useTransitionHelper = () => React.useTransition(); | ||
const useDeferredValueHelper = () => | ||
React.useDeferredValue(0, {timeoutMs: 1000}); | ||
const useTransitionHelper = () => React.useTransition(); | ||
const useDeferredValueHelper = () => | ||
React.useDeferredValue(0, {timeoutMs: 1000}); | ||
|
||
orderedHooks.push(useTransitionHelper); | ||
orderedHooks.push(useDeferredValueHelper); | ||
orderedHooks.push(useTransitionHelper); | ||
orderedHooks.push(useDeferredValueHelper); | ||
|
||
hooksInList.push(useTransitionHelper); | ||
hooksInList.push(useDeferredValueHelper); | ||
} | ||
hooksInList.push(useTransitionHelper); | ||
hooksInList.push(useDeferredValueHelper); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
drive-by fix when looking for things gated on experimental.
Also enables these APIs for FB builds.
Docs are work-in-progress.