React Native 0.36: Headless JS, Keyboard API, and More
Article Summary
React Native 0.36 just dropped with game-changing background task support. If you've been waiting to run JavaScript while your app sleeps, this is your moment.
The React Native team released version 0.36 with four major developer experience improvements. This update focuses on background processing capabilities, better keyboard handling, enhanced animations, and cross-platform status bar styling.
Key Takeaways
- Headless JS enables background tasks like data sync and push notifications (Android only)
- New Keyboard API simplifies on-screen keyboard management with Keyboard.dismiss()
- Animated.divide() unlocks inverse animations like inverting scale transformations
- Dark status bars now work cross-platform with unified barStyle API
React Native 0.36 brings background JavaScript execution to Android and streamlines keyboard, animation, and status bar APIs across platforms.
About This Article
React Native developers couldn't listen to keyboard events or control the keyboard programmatically. This made it hard to respond when the keyboard appeared or disappeared, and the solutions differed between iOS and Android.
React Native added the Keyboard API module with methods like Keyboard.dismiss(). Developers can now access native keyboard events and controls directly without writing platform-specific code.
Keyboard interactions work the same way on iOS and Android. Developers just import the Keyboard module and call the standard methods, so they don't need separate native code for each platform.