This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Reference :: https://www.robertcooper.me/using-eslint-and-prettier-in-a-typescript-project | |
// package.json | |
"devDependencies": { | |
"@babel/code-frame": "7.0.0", | |
"@babel/parser": "7.3.2", | |
"@babel/plugin-proposal-class-properties": "^7.1.0", | |
"@babel/plugin-proposal-decorators": "^7.1.2", | |
"@types/react": "^16.7.3", | |
"@types/react-native": "^0.57.7", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 이렇게 반복하는 애니메이션. | |
animationStart2(sclF) { | |
Animated.loop( | |
Animated.sequence([ | |
Animated.timing(this.state.sclX, { | |
toValue: 0.9 * width * sclF, duration: 1000, delay: 0, | |
}), | |
Animated.timing(this.state.sclX, { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 이렇게 반복하는 애니메이션. | |
animationStart2(sclF) { | |
Animated.loop( | |
Animated.sequence([ | |
Animated.timing(this.state.sclX, { | |
toValue: 0.9 * width * sclF, duration: 1000, delay: 0, | |
}), | |
Animated.timing(this.state.sclX, { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Alert, Animated, Easing } from 'react-native'; | |
this.aniStg = new Animated.Value(0); // 어디선가 초기화를. | |
startAnimation() { | |
const easing = Easing.ease; // elastic(1); | |
Animated.timing( | |
this.aniStg, | |
{ | |
toValue: 1, duration: 1000, delay: 50, easing, // 1 second |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#if __has_include(<AppsFlyerLib/AppsFlyerTracker.h>) // from Pod | |
#import <AppsFlyerLib/AppsFlyerTracker.h> | |
#else | |
#import "AppsFlyerTracker.h" | |
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NSData *jsonData = [theJson dataUsingEncoding:NSUTF8StringEncoding]; | |
NSError *err; | |
NSDictionary *dict = [NSJSONSerialization JSONObjectWithData:jsonData | |
options:NSJSONReadingAllowFragments error:&err]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# run on other port | |
react-native start --port 8085 | |
npm start -- --port=8080 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Ref: https://www.w3schools.com/js/js_errors.asp | |
// 모든 함수 공통 사용 에러 표시 메시지. | |
export const fetchRespNotOK = (resp) => { | |
console.log(resp, resp.status, resp.statusText); | |
const msg = _.isNil(resp.statusText) ? '네트워크 오류' : resp.statusText; | |
Alert.alert('네트워크 오류', `인터넷 연결을 확인해 주세요 (${msg})`); | |
}; | |
export const parseResult = (resp, nullCaseObj) => { | |
if (!_.isNil(resp) && resp.result && resp.result.ret === 'success') { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
code-push deployment ls mobile-android | |
# Release Current Version | |
code-push release-react mobile-ios ios --deploymentName Production --mandatory true |