ReactNative
Userドキュメント用のTypeを用意する import firebase from "firebase" export type User = { id?: string name: string createdAt: firebase.firestore.Timestamp updatedAt: firebase.firestore.Timestamp } export const initialUser: User = { name: "",…
IOSの場合 shadowColor: #ccc, shadowOffset: { width: 0, height: 2, }, shadowRadius: 0, shadowOpacity: 1, shadowOffset width: 横への影 height: 縦の影 shadowOpacity 影の透明度 0が透明、1は透明なし これでこんな感じで下に影をつけられる Android…
const TabBarIcon = (props) => { return ( <Icon name={props.name} type="ionicon" color={props.focused ? hoge_color : fuga_color} /> ); }; フォントではなく画像を使いたい場合はImageを返す <Scene key="home" initial component={HomeScreen} tabBarLabel='ホーム', icon={({ focused }) => </scene></icon>
Providerコンポーネント react-reduxが提供するReactコンポーネント 唯一Storeを持つことができるコンポーネント 配下のコンポーネントにStoreに保持するstateやdispatcherを渡す役目 Reduxでは1つのstateでアプリケーションの状態管理をするため、アプリケ…
アプリを作った段階でデフォルトで作られるファイルの一つ。アプリ全体のライフタイムイベントを管理するためのクラス application: didFinishLaunchingWithOptions アプリが初めて起動した時に呼び出される application:applicationWillResignActive アプリ…
変数 変数の型 変数名: int num = 100; int num; num = 100; データの種類 int: 整数 float: 小数点つきの数値 BOOL: YES/NOに使う 変数には数値しか入らない ポインター変数 ポインター変数とは「メモリ上のオブジェクトを指し示すアドレス」の数値が入って…
プロジェクトの作成 $ react-native init redux_test 必要なライブラリのインストール $ cd redux_test $ npm install $ npm install --save redux react-redux シミュレータ起動 $ rm -rf ios/build $ react-native run-ios たまに前ビルドした結果が残って…