react/scripts
Josh Story b345523528
[Fizz] Support abort reasons (#24680)
* [Fizz] Support abort reasons

Fizz supports aborting the render but does not currently accept a reason. The various render functions that use Fizz have some automatic and some user-controlled abort semantics that can be useful to communicate with the running program and users about why an Abort happened.

This change implements abort reasons for renderToReadableStream and renderToPipeable stream as well as legacy renderers such as renderToString and related implementations.

For AbortController implementations the reason passed to the abort method is forwarded to Fizz and sent to the onError handler. If no reason is provided the AbortController should construct an AbortError DOMException and as a fallback Fizz will generate a similar error in the absence of a reason

For pipeable  streams, an abort function is returned alongside pipe which already accepted a reason. That reason is now forwarded to Fizz and the implementation described above.

For legacy renderers there is no exposed abort functionality but it is used internally and the reasons provided give useful context to, for instance to the fact that Suspense is not supported in renderToString-like renderers
2022-06-07 22:36:09 -07:00
..
babel [DevTools] ignore tests without reactVersion pragma if REACT_VERSION specified (#24555) 2022-05-14 00:54:50 -04:00
bench Bump ecstatic from 2.2.1 to 2.2.2 in /scripts/bench (#20468) 2021-06-29 16:53:31 -04:00
circleci Add snapshot testing on e2e test failure (#24672) 2022-06-06 10:36:58 -07:00
devtools DevTools release script: Show changelog before minor/patch prompt (#24200) 2022-03-30 09:26:33 -04:00
error-codes [Fizz] Support abort reasons (#24680) 2022-06-07 22:36:09 -07:00
eslint Migrate from CLIEngine to the new ESLint class. (#22756) 2021-11-18 21:12:18 +00:00
eslint-rules Remove unused react-internal/invariant-args ESLint rule. (#22778) 2021-11-16 20:11:20 +00:00
flow Unify JSResourceReference Interfaces (#24507) 2022-05-06 11:24:04 -07:00
git Remove leftover env variable logic in pre-commit hook 2015-09-01 14:35:47 -07:00
jest fix scripts folder text (#24609) 2022-05-25 09:56:35 -04:00
merge-fork Bugfix: Revealing a hidden update (#24685) 2022-06-07 20:04:02 -04:00
perf-counters Drop the year from Facebook copyright headers and the LICENSE file. (#13593) 2018-09-07 15:11:23 -07:00
prettier DevTools: Update named hooks match to use column number also (#21833) 2021-07-08 16:12:22 -04:00
print-warnings Add onRecoverableError option to hydrateRoot, createRoot (#23207) 2022-02-04 07:57:33 -08:00
release Allow aritfacts download even if CI is broken (#24666) 2022-06-02 21:55:35 -04:00
rollup Unify JSResourceReference Interfaces (#24507) 2022-05-06 11:24:04 -07:00
shared [Fizz] Support abort reasons (#24680) 2022-06-07 22:36:09 -07:00
tasks Migrate from CLIEngine to the new ESLint class. (#22756) 2021-11-18 21:12:18 +00:00
yarn chore: upgrade to jest 24 (#15778) 2019-10-03 22:44:18 +05:30
authors AUTHORS 2013-09-09 23:42:54 -07:00