Yeswanth Swami
First WalkIn Technologies, India
Native Realm (Java)
JS Realm
(Javascript)
Bridge
(C++/Java)
UI thread
Button
JS thread
Runs Js
Layout
Dispatch view updates
Update UI
[...,create View(id,RCTView,..)]
view.appendChild(RCTView)
UI thread
Button
JS thread
Runs Js
View Managers
Dispatch view updates
Update UI
Dispatch view updates
Update UI
Runs Js
x 60/sec
Animated.sequence([
// decay, then spring to start and twirl
Animated.decay(position, {
// coast to a stop
velocity: {x: gestureState.vx, y: gestureState.vy}, // velocity from gesture release
deceleration: 0.997,
}),
Animated.parallel([
// after decay, in parallel:
Animated.spring(position, {
toValue: {x: 0, y: 0}, // return to start
}),
Animated.timing(twirl, {
// and twirl
toValue: 360,
}),
]),
]).start();
InteractionManager.runAfterInteractions(() => {
// ...long-running synchronous task...
});
Let's say you are transitioning from Screen1 to Screen2 and need to do some computation before rendering Screen2
Not yet released!
1. settings.gradle file -> Path to Android native folder (for that library)
2. app/build.gradle file -> 'compile' command for the Android project (for that library)
3. MainApplication.java -> Tell RN about the package
1. Add project to Libraries
2. Target > General > Linked Frameworks & Libraries > Select your RN library
Android
Java
Groovy (In gradle)
XML
iOS
ObjC
Swift
pbxproj (own format)
Javascript
React
React-Native