Skip to content

Commit

Permalink
Feature/#5 디버깅툴 reactotron 적용 (#55)
Browse files Browse the repository at this point in the history
* feat(apps/app): reactotron-react-native 설치

* feat(apps/app): @react-native-async-storage/async-storage 설치

* feat(apps/app): reactotron react native 관련 설정 파일 추가

* feat(apps/app): reactotron 불러오는 구문 추가

* feat(apps/app): networking 추적 기능 추가

* feat(apps/app): 글로벌 에러, 글로벌 로그 추적 기능 추가

* fix(apps/web): es6 방식으로 구문 수정
  • Loading branch information
ghdtjgus76 authored Dec 21, 2024
1 parent 245fce2 commit 0994650
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 9 deletions.
16 changes: 10 additions & 6 deletions apps/app/App.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import React from "react";
import { StyleSheet, Text, View } from "react-native";
import React from 'react';
import {StyleSheet, Text, View} from 'react-native';

const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: "#fff",
alignItems: "center",
justifyContent: "center",
backgroundColor: '#fff',
alignItems: 'center',
justifyContent: 'center',
},
});

Expand All @@ -21,7 +21,11 @@ function App() {
let AppEntryPoint = App;

if (process.env.STORYBOOK_ENABLED) {
AppEntryPoint = require("./.ondevice").default;
AppEntryPoint = require('./.ondevice').default;
}

if (__DEV__) {
require('./ReactotronConfig');
}

export default AppEntryPoint;
18 changes: 18 additions & 0 deletions apps/app/ReactotronConfig.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import Reactotron, {
networking,
trackGlobalErrors,
trackGlobalLogs,
} from 'reactotron-react-native';
import AsyncStorage from '@react-native-async-storage/async-storage';

Reactotron.setAsyncStorageHandler(AsyncStorage)
.configure({
name: 'greeenai',
})
.useReactNative({
asyncStorage: true,
})
.use(networking())
.use(trackGlobalErrors())
.use(trackGlobalLogs())
.connect();
3 changes: 2 additions & 1 deletion apps/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
},
"dependencies": {
"@gorhom/bottom-sheet": "^4.6.4",
"@react-native-async-storage/async-storage": "^2.0.0",
"@react-native-async-storage/async-storage": "^2.1.0",
"@react-native-community/datetimepicker": "^8.2.0",
"@react-native-community/slider": "^4.5.3",
"react": "18.3.1",
Expand Down Expand Up @@ -73,6 +73,7 @@
"jest": "^29.6.3",
"prettier": "2.8.8",
"react-test-renderer": "18.3.1",
"reactotron-react-native": "^5.1.10",
"storybook": "^8.3.5",
"typescript": "5.0.4"
},
Expand Down
2 changes: 1 addition & 1 deletion apps/web/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ import { createVanillaExtractPlugin } from "@vanilla-extract/next-plugin";
const nextConfig = {};
const withVanillaExtract = createVanillaExtractPlugin();

module.exports = withVanillaExtract(nextConfig);
export default withVanillaExtract(nextConfig);
29 changes: 28 additions & 1 deletion pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 0994650

Please sign in to comment.