react/scripts
Josh Story 796d31809b
Implement basic stylesheet Resources for react-dom (#25060)
Implement basic support for "Resources". In the context of this commit, the only thing that is currently a Resource are

<link rel="stylesheet" precedence="some-value" ...>

Resources can be rendered anywhere in the react tree, even outside of normal parenting rules, for instance you can render a resource before you have rendered the <html><head> tags for your application. In the stream we reorder this so the browser always receives valid HTML and resources are emitted either in place (normal circumstances) or at the top of the <head> (when you render them above or before the <head> in your react tree)

On the client, resources opt into an entirely different hydration path. Instead of matching the location within the Document these resources are queried for in the entire document. It is an error to have more than one resource with the same href attribute.

The use of precedence here as an opt-in signal for resourcifying the link is in preparation for a more complete Resource implementation which will dedupe resource references (multiple will be valid), hoist to the appropriate container (body, head, or elsewhere), order (according to precedence) and Suspend boundaries that depend on them. More details will come in the coming weeks on this plan.

This feature is gated by an experimental flag and will only be made available in experimental builds until some future time.
2022-08-12 13:27:53 -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 Implement basic stylesheet Resources for react-dom (#25060) 2022-08-12 13:27:53 -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 Add test gate alias for Offscreen (#24749) 2022-06-30 09:44:54 -04:00
merge-fork Land forked reconciler changes (#24878) 2022-07-08 11:55:53 -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 Add entry points for "static" server rendering passes (#24752) 2022-06-18 22:34:31 -04:00
shared Add entry points for "static" server rendering passes (#24752) 2022-06-18 22:34:31 -04: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