infinitered / infinitered/reactotron
console.log capturing starts not immediatelly
- Dominant language
- TypeScript
- Stars
- 15.6k
- Forks
- 972
- PR merge metrics
- No merged PRs in 30d
Description
`console.log` capturing starts not immediatelly when no problems with `Reactotron.log`
In the next example `console log 1` will not be printed in the Reactotron app when no problems with `reactotron log 1`.
```
Reactotron.configure({
name: 'app',
})
.useReactNative()
.connect();
console.log('console log 1');
Reactotron.log('reactotron log 1');
setTimeout(() => {
console.log('console log 2');
Reactotron.log('reactotron log 2');
}, 1);
```
Repro here if need: https://github.com/Bardiamist/diff/tree/reactotron
Previously I used:
```
console.log = (...args) => {
console.log(...args);
Reactotron.log?.(...args);
};
```
Now it leads to double logs. Maybe you need to implement some override like this.
Contributor guide
Research direction
Start at the Reactotron.configure, useReactNative, and connect entry points, using the linked reproduction to observe when console.log interception begins. Verify the behavior for the first console.log and Reactotron.log calls, then check the delayed calls. Done means the initial console output is captured without causing duplicate logs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react-native, typescript
- Domain
- devtools, mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100