SIGN IN SIGN UP
facebook / react-native UNCLAIMED

A framework for building native applications using React

0 0 155 C++

Fix junk in React warnings in Logbox (#44812)

Summary:
Before all React errors showed junk like this:

![Screenshot 2024-06-06 at 06 24 38](https://github.com/facebook/react-native/assets/810438/40be3133-e31d-43e8-b04d-ffbc5b462027)

This is because `isComponentStack` detected a component stack but `parseComponentStack` couldn't actually parse it (it doesn't deal with React's current format like `in Foo (created by FeedItemInner)`) so `componentStack` was an empty array, resulting in the next block of code pushing stuff into `argsWithoutComponentStack` _again_, thus repeating its args.

The fix is not to do that. Result on my local copy:

![Screenshot 2024-06-06 at 06 24 24](https://github.com/facebook/react-native/assets/810438/8f3d32d9-6f28-472c-be34-c802a0e2f161)

Ofc this doesn't actually show the component stack but that was broken before too.

I edited in-place in my `node_modules` so I haven't verified this 100% works on main.

Hope this is useful!

## Changelog:

[General] [Fixed] - Remove accidental duplication in React warnings in Logbox

Pull Request resolved: https://github.com/facebook/react-native/pull/44812

Reviewed By: cortinico

Differential Revision: D58240357

Pulled By: rickhanlonii

fbshipit-source-id: b6ecb659d3b393e497caf5e7b2087a8e529f1b28
D
dan committed
32c3cd3e8addb924f904de19c6e311a0ddb4e963
Parent: 2a0a112
Committed by Facebook GitHub Bot <facebook-github-bot@users.noreply.github.com> on 6/11/2024, 10:16:13 PM