GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Revert "Append text string to <Text> error message (#19581)" (#19723) · react/react@380dc95

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • packages/react-native-renderer/src
    • ReactFabricHostConfig.js
    • ReactNativeHostConfig.js
    • __tests__
      • ReactFabric-test.internal.js
      • ReactNativeMount-test.internal.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎packages/react-native-renderer/src/ReactFabricHostConfig.js‎

Copy file name to clipboardExpand all lines: packages/react-native-renderer/src/ReactFabricHostConfig.js
+1-2Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -244,8 +244,7 @@ export function createTextInstance(
244244
): TextInstance {
245245
invariant(
246246
hostContext.isInAParentText,
247-
'Text string must be rendered within a <Text> component.\n\nText: %s',
248-
text.length > 100 ? text.substr(0, 88) + ' (truncated)' : text,
247+
'Text strings must be rendered within a <Text> component.',
249248
);
250249

251250
const tag = nextReactTag;
Collapse file

‎packages/react-native-renderer/src/ReactNativeHostConfig.js‎

Copy file name to clipboardExpand all lines: packages/react-native-renderer/src/ReactNativeHostConfig.js
+1-2Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,7 @@ export function createTextInstance(
146146
): TextInstance {
147147
invariant(
148148
hostContext.isInAParentText,
149-
'Text string must be rendered within a <Text> component.\n\nText: %s',
150-
text.length > 100 ? text.substr(0, 88) + ' (truncated)' : text,
149+
'Text strings must be rendered within a <Text> component.',
151150
);
152151

153152
const tag = allocateTag();
Collapse file

‎packages/react-native-renderer/src/__tests__/ReactFabric-test.internal.js‎

Copy file name to clipboardExpand all lines: packages/react-native-renderer/src/__tests__/ReactFabric-test.internal.js
+2-12Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -563,15 +563,7 @@ describe('ReactFabric', () => {
563563
}));
564564

565565
expect(() => ReactFabric.render(<View>this should warn</View>, 11)).toThrow(
566-
'Text string must be rendered within a <Text> component.\n\nText: this should warn',
567-
);
568-
569-
expect(() =>
570-
ReactFabric.render(<View>{'x'.repeat(200)}</View>, 11),
571-
).toThrow(
572-
`Text string must be rendered within a <Text> component.\n\nText: ${'x'.repeat(
573-
88,
574-
)} (truncated)`,
566+
'Text strings must be rendered within a <Text> component.',
575567
);
576568

577569
expect(() =>
@@ -581,9 +573,7 @@ describe('ReactFabric', () => {
581573
</Text>,
582574
11,
583575
),
584-
).toThrow(
585-
'Text string must be rendered within a <Text> component.\n\nText: hi hello hi',
586-
);
576+
).toThrow('Text strings must be rendered within a <Text> component.');
587577
});
588578

589579
it('should not throw for text inside of an indirect <Text> ancestor', () => {
Collapse file

‎packages/react-native-renderer/src/__tests__/ReactNativeMount-test.internal.js‎

Copy file name to clipboardExpand all lines: packages/react-native-renderer/src/__tests__/ReactNativeMount-test.internal.js
+2-12Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -423,15 +423,7 @@ describe('ReactNative', () => {
423423
}));
424424

425425
expect(() => ReactNative.render(<View>this should warn</View>, 11)).toThrow(
426-
'Text string must be rendered within a <Text> component.\n\nText: this should warn',
427-
);
428-
429-
expect(() =>
430-
ReactNative.render(<View>{'x'.repeat(200)}</View>, 11),
431-
).toThrow(
432-
`Text string must be rendered within a <Text> component.\n\nText: ${'x'.repeat(
433-
88,
434-
)} (truncated)`,
426+
'Text strings must be rendered within a <Text> component.',
435427
);
436428

437429
expect(() =>
@@ -441,9 +433,7 @@ describe('ReactNative', () => {
441433
</Text>,
442434
11,
443435
),
444-
).toThrow(
445-
'Text string must be rendered within a <Text> component.\n\nText: hi hello hi',
446-
);
436+
).toThrow('Text strings must be rendered within a <Text> component.');
447437
});
448438

449439
it('should not throw for text inside of an indirect <Text> ancestor', () => {

0 commit comments

Comments
0 (0)
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.