Skip to content

Commit b0147c7

Browse files
machourHoussein Djirdeh
authored andcommitted
chore(reactotron): bump libs and display console.log() (#753)
1 parent e624c54 commit b0147c7

File tree

3 files changed

+23
-4
lines changed

3 files changed

+23
-4
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,8 @@
137137
"react-dom": "^16.2.0",
138138
"react-native-cli": "^2.0.1",
139139
"react-test-renderer": "^16.0.0",
140-
"reactotron-react-native": "^1.12.2",
141-
"reactotron-redux": "^1.12.2",
140+
"reactotron-react-native": "^1.14.0",
141+
"reactotron-redux": "^1.13.0",
142142
"stylelint": "^8.2.0",
143143
"stylelint-config-standard": "^18.0.0",
144144
"stylelint-config-styled-components": "^0.1.1",

src/config/reactotron.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,25 @@ import Reactotron from 'reactotron-react-native';
33
import { reactotronRedux } from 'reactotron-redux';
44

55
if (__DEV__ && process.env.TRON_ENABLED) {
6+
/* eslint-disable no-console */
7+
const hijackConsole = () => {
8+
const oldConsoleLog = console.log;
9+
10+
console.log = (...args) => {
11+
oldConsoleLog(...args);
12+
13+
Reactotron.display({
14+
name: 'CONSOLE.LOG',
15+
important: true,
16+
value: args,
17+
preview:
18+
args.length > 0 && typeof args[0] === 'string' ? args[0] : null,
19+
});
20+
};
21+
};
22+
23+
hijackConsole();
24+
625
Reactotron.configure()
726
.useReactNative()
827
.use(reactotronRedux())

yarn.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6974,7 +6974,7 @@ reactotron-core-client@^1.13.0:
69746974
ramda "^0.24.1"
69756975
ramdasauce "^2.0.0"
69766976

6977-
reactotron-react-native@^1.12.2:
6977+
reactotron-react-native@^1.14.0:
69786978
version "1.14.0"
69796979
resolved "https://registry.yarnpkg.com/reactotron-react-native/-/reactotron-react-native-1.14.0.tgz#9f8ca3d9cd09aa2a6c5179307f97f923afe40a48"
69806980
dependencies:
@@ -6987,7 +6987,7 @@ reactotron-react-native@^1.12.2:
69876987
rn-host-detect "^1.1.3"
69886988
socket.io-client "~1.7.3"
69896989

6990-
reactotron-redux@^1.12.2:
6990+
reactotron-redux@^1.13.0:
69916991
version "1.13.0"
69926992
resolved "https://registry.yarnpkg.com/reactotron-redux/-/reactotron-redux-1.13.0.tgz#20f8ce98cbb5e310e041dc85fc4dc4f904aa5dcc"
69936993
dependencies:

0 commit comments

Comments
 (0)