React Native
Androidはまた別ぽいけどiOSだけ対応でざっくりやるならこんな感じ <View> <Text style={{textDecorationLine: 'underline' }} onPress={() => { // <actural phone number>は実際の番号で置き換える const url = 'tel:<actural phone number>' Linking.openURL(url).catch(err => console.error('An error occurred', err)); }} > 電話をかける </Text> </View> Linking…
When Using React Native Tav View with defalut index to 1, I happened to face a strange behaviour; automatically swipes to index 0 sometimes when opening the scene. So what I did was to set initialLayout and it fixed it. Like this: const in…
React Nativeで画像のトリミングができる。特に外部のコンポーネントを入れる必要はない。 標準の ImageEditor を使ってできる。 しかしながらいかんせんドキュメントが少ないのでここに記録も兼ねて残そうと思う。 ※ 記事執筆時に使用したReact Nativeのバ…
React Native のImageを使うときの注意 とりあえずImage要素にサイズ(widthとheight)は指定する。じゃないと表示されない。 バージョン: 0.44.0 追記: 2017/07/07: 0.47.0以降のバージョンでこの制約は消えそう。Using <Image> with nested content now causes warn</image>…
TouchableWithoutFeedbackとか使うとき、 とりあえず内部の要素はTextだろうがImageだろうがViewでラップしておくのが無難。 余計なハマりポイントを回避できる。 バージョン: 0.44.0
https://github.com/wix/detox これ使えそうと思ったけど、Permission用Alert周りの処理で詰んだ。 工夫すればできそうだけどまた後ほどtryする。 導入自体はすごく簡単だった。 このIssueがcloseする頃にはそこらへんいい感じになってるのではと期待: githu…
React Nativeで開発でのデバッグにはNuclideを使っていたけど、react-devtoolsも使える。 インストール方 グローバルにインストールする場合 npm install -g react-devtools これでreact-devtoolsとterminalでやれば走る。 プロジェクトにインストールする場…
Release v1.0.0-beta.10 · react-community/react-navigation · GitHub React Navigation V1.0.0-beta.10が出た。そう、React Navigationはまだbetaが取れてない。 使い始める前に現状どんな問題があるか確認しておくと時間を節約できると思う。 どこを確認…
nishinipporirb.doorkeeper.jp 参加してきた。というか主催者の一人w 今回はオーガナイザーの一人であるじょうさん (@joe_re) が本↓を執筆したので記念LT会をした。 gihyo.jp テーマは自由。けれど本がElectronということもあり、かなーりfrontよりのLT会だ…
React Navigation, APIはいい感じなんだけど現状beta版ということもあり、プロダクションで使っていこうと思うとなかなか機能が足りない。 それで2017/4/7現在では、v1リリースに向けて最低限必要な機能を実装していこうという状態にある。(と信じている) …
2018-5-10追記: 先日v2も出ました。今目にしているブログ記事はだいぶ古いと思うので注意です。React Navigation (v2) · Routing and navigation for your React Native apps 2017/9/15追記: React Navigationは開発サイクルがしばらく停滞していたけれど、…
という記事を書いた。 taiki-t.hatenablog.com だいたい図にした。constrainsの設定の時だけ、対象のオブジェクトからviewへcontrol + click してドラッグというのがわかりにくいかも。
という記事を雑にかいた。 taiki-t.hatenablog.com コードは参考になると良いと思う。
It took a longtime to figure out how to upload images to aws s3 using presigned post from React Native. The key part is to use FormData to construct a payload and post it with POST http method. PUTing FormData payload with pre-signed URL d…
追記: 2017/08/31 これはRelay Classicの時に書いたものです。 Introduction 非同期処理で何かごにょごにょした後、Relayにその値を使ってサーバーにリクエストを投げてほしかった。 やり方 Relay.createContainerを関数でラップする 雑な実装例: componentD…
追記 2017-11-27: 結局今はFastImageを使っている。GitHub - DylanVann/react-native-fast-image: FastImage, performant React Native image component. 最高。 プロローグ React Native使ってみた。Imageコンポーネント、毎回ネットワークから取得してる…
My long attempts to show an image on launch screen (or splash screen) in iOS app with React Native have failed so far and here is a solution I finally found. The key is to make use of LaunchScreen.xib and not to use bunch of launch screen …
プロローグ Railsって色々ヘルパーが用意されていて便利。ActionView::Helpers::TextHelper#truncateもその一つ。これは、文字列を切り詰めて末尾に...と付けてくれる。そういうヘルパーみたいなのがRNにもあったら便利だな?と思った。そしたら、あった。 n…