fiber
native-navigation
subscription & live-query
react-storybook
create-react-native-app
react-router v4
react-vr
reason
prettier
The goal of React Fiber is to increase its suitability for areas like animation, layout, and gestures. Its headline feature is incremental rendering: the ability to split rendering work into chunks and spread it out over multiple frames.
雖然幾乎是核心重寫,但 reconciliation 的 high level 演算法本身差異不大,重點在於 render 的 stack 與 scheduling
We need to be able to
pause work and come back to it later.
assign priority to different types of work.
reuse previously completed work.
abort work if it's no longer needed.
A Fiber
A virtual stack frame
A unit of "work"
Pausable / Prioritizable / Memoizable / Abortable
Stack Frame vs Fiber
priorities
SynchronousPriority: 1, // For controlled text inputs. Synchronous side-effects.
TaskPriority: 2, // current tick.
AnimationPriority: 3, // before the next frame.
HighPriority: 4, // Interaction that needs to complete pretty soon to feel responsive.
LowPriority: 5, // Data fetching, or result from updating stores.
OffscreenPriority: 6, // Won't be visible but do the work in case it becomes visible.
From renderers/shared/fiber/ReactPriorityLevel.js
Note
component 可以 return array, number, string
component will update 可能會被 call 不只一次
未來
setState ({});
可能會被拿掉,用 functional setState:
this .setState ((state, props ) => { return {}; });
Native vs JS based navigation
VIDEO
內建
NavigatorIOS (只支援 iOS,所以不太有用)
Navigator (效果差,State 不好處理)
NavigationExperimental (deprecated)
Polling & Live Query && Subscription
Polling
Polling
pull
easy to maintain (simple, stateless)
latency
Polling Frequently
Live Query
Live Query
push
listen every state change
you dont know why state changed
facebook 有在公司內部實驗 @live
directive
Subscription
Subscription
push
event based subscription
you know why state changed exactly
storybook-addon-knobs
storybook-addon-specifications
storyshots
Introducing Create React Native App
With Create React Native App, there’s no need to use Xcode or Android Studio, and you can develop for your iOS device using Linux or Windows. This is accomplished using the Expo app, which loads and runs CRNA projects written in pure JavaScript without compiling any native code.
create-react-native-app project
沒什麼特別意外的指令:
yarn run ios
yarn run android
yarn test
yarn start
不需要 iOS、Android 開發環境,只要 Mobile Device
Exponent 改名 Expo
Facebook 以外最大的 React Native 專業團隊
Expo SDK ,包括 Accelerometer
, Amplitude
, AppLoading
, Art
, Asset
, Audio
, BarCodeScanner
, BlurView
, Constants
, Contacts
, Facebook
, Font
, GLView
, Google
, Gyroscope
, ImagePicker
, KeepAwake
, LinearGradient
, Location
, MapView
, Notifications
, Permissions
, Segment
, Svg
, takeSnapshotAsync
, Util
, Video
等 API
需要安裝或修改 Native ?
yarn run eject
React VR
Phone & Gear VR headset
style with CSS-in-JS approach
UX
Official Docs
重點應該在今年 F8 有 8 個 VR topic
Reason
dessign a new meta language
參考了 Elm, F#, Clojure
可以解決語言層面才能解決的問題
不需要 linter, prettier
early stage
25% of messenger now built with reason
稍微調一下還是能寫 jsx
git clone https://gi thub.com/reasonml/ ReasonProject.git
cd ReasonProject
npm install
Resume presentation
React Conf 2017 Day 1 Day 2 Videos
{"metaMigratedAt":"2023-06-14T12:34:30.145Z","metaMigratedFrom":"Content","title":"React Conf 2017","breaks":true,"contributors":"[]"}