Skip to content

Commit 25fc795

Browse files
committed
copy fix in <style> precedence error
1 parent 9defcd5 commit 25fc795

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

packages/react-dom-bindings/src/client/ReactFiberConfigDOM.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -3022,10 +3022,9 @@ export function isHostHoistableType(
30223022
console.error(
30233023
'Cannot render a <style> outside the main document without knowing its precedence and a unique href key.' +
30243024
' React can hoist and deduplicate <style> tags if you provide a `precedence` prop along with an `href` prop that' +
3025-
' does not conflic with the `href` values used in any other hoisted <style> or <link rel="stylesheet" ...> tags. ' +
3025+
' does not conflict with the `href` values used in any other hoisted <style> or <link rel="stylesheet" ...> tags. ' +
30263026
' Note that hoisting <style> tags is considered an advanced feature that most will not use directly.' +
3027-
' Consider moving the <style> tag to the <head> or consider adding a `precedence="default"` and `href="some unique resource identifier"`, or move the <style>' +
3028-
' to the <style> tag.',
3027+
' Consider moving the <style> tag to the <head> or consider adding a `precedence="default"` and `href="some unique resource identifier"`.',
30293028
);
30303029
}
30313030
}

packages/react-dom/src/__tests__/ReactDOMFloat-test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -547,7 +547,7 @@ describe('ReactDOMFloat', () => {
547547
);
548548
await waitForAll([]);
549549
}).toErrorDev([
550-
'Cannot render a <style> outside the main document without knowing its precedence and a unique href key. React can hoist and deduplicate <style> tags if you provide a `precedence` prop along with an `href` prop that does not conflic with the `href` values used in any other hoisted <style> or <link rel="stylesheet" ...> tags. Note that hoisting <style> tags is considered an advanced feature that most will not use directly. Consider moving the <style> tag to the <head> or consider adding a `precedence="default"` and `href="some unique resource identifier"`, or move the <style> to the <style> tag.',
550+
'Cannot render a <style> outside the main document without knowing its precedence and a unique href key. React can hoist and deduplicate <style> tags if you provide a `precedence` prop along with an `href` prop that does not conflict with the `href` values used in any other hoisted <style> or <link rel="stylesheet" ...> tags. Note that hoisting <style> tags is considered an advanced feature that most will not use directly. Consider moving the <style> tag to the <head> or consider adding a `precedence="default"` and `href="some unique resource identifier"`.',
551551
'Warning: In HTML, <style> cannot be a child of <html>.',
552552
]);
553553

0 commit comments

Comments
 (0)