dillon1000/react
Commit
Browse files Add unknown location information to component stacks (#30290)
This is the same change as in #30289 but for the main runtime - e.g. parent stacks in errorInfo.componentStack, appended stacks to console.error coming from React itself and when we add virtual frames to owner stacks. Since we don't add location information these frames look weird to some stack parsers - such as the native one. This is an existing issue when you want to use some off-the-shelf parsers to parse production component stacks for example. While we won't add Error objects to logs ourselves necessarily, some third party could want to do the same thing we do in DevTools and so we should provide the same capability to just take this trace and print it using an Error object.
Changed paths3 files
First-parent comparisonpackages/react-dom/src/__tests__/ReactDOMSingletonComponents-test.js ModifiedM packages/react-server/src/ReactFizzServer.js ModifiedM packages/shared/ReactComponentStackFrame.js ModifiedPatch
Files changed
Rendering syntax-highlighted changes…