Tim Wang @timwangdev
Frontend Developer
import { Platform, ActionSheetIOS } from 'react-native';
import BottomSheetAndroid from 'react-native-bottom-sheet';
import trans from '@/core/i18n';
const showSheet = Platform.OS === 'android'
? BottomSheetAndroid.showBottomSheetWithOptions
: ActionSheetIOS.showActionSheetWithOptions;
const options: Array<string> = [
trans('B_VIEW_PROFILE'),
trans('B_SEND_NO_THANKS'),
trans('B_HIDE'),
trans('B_DELETE'),
trans('B_CANCEL'),
];
// class ... {
private onButtonPress = () => {
showSheet({ options }, callbacks);
}
Source: The State of the Octoverse 2017 (https://octoverse.github.com/)
yarn, jest, babel, typescript
// Example.ts
let foo = '12'; // Type inference as string
foo = 42; // Error: Type '42' is not assignable to type 'string'.
let bar: any = '12';
bar = 42; // No error
Don't mix `yarn` with `npm`
Use `yarn.lock`
Lock version for package contains native code
patch-package
React Native at Airbnb - Gabriel Peal - https://medium.com/airbnb-engineering/react-native-at-airbnb-f95aa460be1c
State of React Native 2018 - Sophie Alpert - https://facebook.github.io/react-native/blog/2018/06/14/state-of-react-native-2018
Sneak Peek: Beyond React 16 - Sophie Alpert, Dan Abramov - https://reactjs.org/blog/2018/03/01/sneak-peek-beyond-react-16.html
Should we use React Native? - Charlie Cheever -
https://blog.expo.io/should-we-use-react-native-1465d8b607ac
Bridging React Native Back to its Roots - Vincent Riemer - https://www.youtube.com/watch?v=aOWIJ4Mgb2k