React Native Paper 4.0 adds TextInput adornments and auto theming
Callstack has announced version 4.0 of React Native Paper, its collection of customizable, production-ready, cross-platform components for React Native that follow Google's Material Design Guidelines. The release was developed by the Callstack team together with community contributors.
The library focuses on platform adaptation, theming, and accessibility including right-to-left language support.
TextInput adornments
TextInput can now display an icon or text affix inside the input. According to the post, this was the most requested feature in the "What do you dislike about React Native Paper" survey conducted in late 2019. The feature was implemented by @matkoson and @jbinda.
Animations and device accessibility settings
Paper now automatically enables or disables all animations based on the user's device settings. Developers can still override this behavior. The feature was implemented by @troZee.
Automatic theme management
Starting with 4.0, React Native Paper checks the device theme and applies the matching theme to Paper components. Like the animation change, this works out of the box and can be overridden for more advanced use cases. Light, dark and custom themes are supported out of the box.
Typescript improvements
Paper moved from Flow to Typescript in version 3.0, but end developers had no way to extend the theme type. In 4.0, Theme is now an interface instead of a type, so additional properties can be added through Typescript's global augmentation feature.
React Native types have also been upgraded to the latest version across the library. Issues caused by incorrect usage of accessibility APIs that changed in RN 0.60 should now be resolved.
Migration
A migration guide for 4.0 covering all breaking changes is available, along with a full changelog.
Links
Source: www.callstack.com