2019年12月10日火曜日

Expo v36でReact Nativeが0.61になってfast refreshが使えるようになったり、Permissionを各モジュールから確認できるようになった的なお話

  • このエントリーをはてなブックマークに追加

Expoがv36にアップデートした。
ついにReact Nativeが0.61になったよね的な。

Expo SDK 36 is now available

ということで今日はいつも通りのざっくり翻訳記事的なお話をば。

■React Native 0.61

SDK 36 includes many of the new features and improvements that are part of React Native 0.60 and 0.61.

React Native0.61を導入したよ的な。
これでfast refreshとか使えるようになったから便利だよねみたいな。


■Dark Mode on Android and Web

In SDK 35, we released support for Dark Mode on iOS with the react-native-appearance module. We’ve now extended support for Dark Mode to Android and Web!
You can use the react-native-appearance module to listen to your users’ appearance preferences and update your UI accordingly. (Check out the Appearance module docs for more information.) And, if you’re using React Navigation, you can enable a built-in dark theme for your navigation components; see the Themes documentation for more detail.

Expo v35でiOSのダークモードに対応したけど、AndroidとWebも対応できるようにしたよ的な。
react-native-appearanceのドキュメントや、react-navigationのドキュメントをチェックしてね的な。


■Reworked Permissions API

In the past, all runtime permissions requests went through the Permissions API, which includes methods and constants for requesting every possible permission Expo can use. This meant that you needed to import from expo-permissions in every file that needed to request permissions from a user.
No more! Now, each module that needs user-facing permissions includes its own methods for requesting and checking the status of permissions. For example, if you use the MediaLibrary API, you can use MediaLibrary.requestPermissionsAsync().
The Permissions module is still available for backwards compatibility and isn’t going anywhere! We’re simply providing these new methods for your convenience 🙂

今までexpo-permissionを使ってPermissionを要求してたものがあったと思うんだけど、それらを各モジュールの中に入れたよ的な。
例えばMediaLibraryを使うときにMediaLibrary.requestPermissionsAsync()って形で要求できるようになった。
もちろんexpo-permissionsは今まで通り使えるから安心してねみたいな。


■Bug Hunt

Throughout October and November, we closed over 350 issues across the expo and expo-cli repos. In the process, we fixed quite a few bugs and inconsistencies across all of our modules, so you might notice things working ever so slightly better than before! Check out our changelog for a detailed list of all the fixes.

いっぱいバグを修正したからCHAGELOG.mdを見てくれよ的な。
個人的にはCamera.Constants.FlashMode.torchが直ってるのがよいなぁと。


■2020 Plans for the Bare Workflow and ExpoKit

We heard your feedback about issues with ExpoKit, and throughout 2019 we’ve been hard at work on a better story for developers who need more customization in their app than we can provide with the Managed workflow.
We landed on the Bare workflow, a way to use Expo APIs in any React Native app. Since we first announced it in February, we’ve extracted almost all of our 60+ modules into unimodules you can use with the Bare workflow, added a number of guides, and collected developer feedback along the way. We’re confident that moving forward, the Bare workflow is the best way to customize your Expo app.
We’re not quite yet at feature parity between ExpoKit and the Bare workflow. Some modules included in ExpoKit (such as Updates, SplashScreen, and TaskManager) are not yet supported in the Bare workflow. However, we’re at work on all of these and expect to introduce solutions for the Bare workflow in 2020. Once we do, we’ll phase out ExpoKit to focus entirely on the Bare and Managed workflows.
Nothing is changing right now with ExpoKit support — however, if you’re thinking about ejecting to ExpoKit in a new project, we highly recommend you check out the other options first to see whether they’ll meet your needs!

2019年の2月にBare Workflow(react-native-unimodules)を発表してから頑張ってreact-nativeでもExpoのAPIを使えるようにしてきたよ的な。
ExpoKitで使えるけどBare Workflowでまだ使えないのはUpdates、SplashScreen、TaskManagerなどがあるけど、2020年中に全部使えるようにして、段階的にExpoKitを廃止していくつもりみたいな。


■API improvements and additions

Facebook module initialization

ErrorRecovery unimodule

Web support improvements

Android FileSystem.documentDirectory migration

Other fixes and improvements

Library updates & breaking changes

とりあえずいっぱい修正改善されてるからCHAGELOG.mdを見てくれよ的な。


ってな感じ。
大きい変更はReact Native0.61なんだけど、細々したところやパフォーマンス修正などがメインだったり。
小さくても積み重なれば問題にはなるわけでめっちゃ修正かける期間は必要だしさすがだなぁと。
個人的には早くBare Workflowで全部のAPIが使えるようになって欲しい的なみたいな。

0 件のコメント:

コメントを投稿

Adsense