X
Business

Mobile app developers: React Native 0.63 is out with LogBox for easier error debugging

Mobile app framework React Native's latest update, version 0.63, also meets Apple's new App Store requirements.
Written by Liam Tung, Contributing Writer

Facebook-backed React Native has released version 0.63 of the cross-platform UI framework with a new feature to tidy up verbose and poorly formatted error logs and with tweaks to help developers conform to Apple's new App Store rules for iPhone apps.    

The new feature to tidy up error messages is called LogBox, which was introduced in version 0.62 as an opt-in feature. In 0.63 LogBox becomes the default experience in React Native, according to the framework's core contributor Mike Grabowski.   

React Native is a JavaScript code library for building user interfaces (UIs), which helps developers write native iOS and Android apps. 

SEE: Hiring Kit: Python developer (TechRepublic Premium)

Facebook open-sourced React Native in 2015, and in 2016 Microsoft launched tools for React Native developers to bring their apps to Windows 10 PCs, Xbox One and HoloLens. 

According to JetBrains, the maker of the IntelliJ IDEA IDE, React Native is the most popular cross-platform mobile UI framework, but it's closely followed by Google's Flutter.      

LogBox's key goals are that the error logs are concise, formatted for quick reading, and actionable. It includes log notifications that show all console.warn and console.log messages, so as not to cover the app; code frames that shows the source code of the error log inside the app. 

Meanwhile, component stacks are stripped from the error messages and are put into their own section. LogBox also now collapses call stack frames not related to an app's code. And it improves formatting for syntax error and adds code frames with syntax highlighting. 

The React Native team warns that it is deprecating YellowBox APIs in favor of LogBox APIs, so developers will need to update call sites off YellowBox APIs before they're removed in version 0.64. Version 0.62 was released in March. 

This version also contains React Native's new Pressable API for detecting various stages of press interactions on a touchscreen. It's meant to address problems with Touchable components, which include effects that don't work with all platforms and give away that an app was written with React Native.  

"To address these problems, we are shipping a new core component called Pressable. This component can be used to detect various types of interactions. The API was designed to provide direct access to the current state of interaction without having to maintain state manually in a parent component," writes Grabowski. 

"It was also designed to enable platforms to extend its capabilities to include hover, blur, focus, and more. We expect that most people will build and share components utilizing Pressable under the hood instead of relying on the default experience of something like TouchableOpacity."

SEE: Linus Torvalds on the future of Linux kernel developers and development

This release of React Native also drops support for iOS 9, some four years after Apple released it. React Native developers think this shouldn't affect too many developers given that iOS 9 has a less than 1% share of all iOS devices. It also drops support for node.js 8 since its LTS maintenance support ended in December 2019. 

Additionally, React Native 0.63 has been tweaked to conform with Apple's new requirement that "all apps submitted to the App Store must use an Xcode storyboard to provide the app's launch screen and all iPhone apps must support all iPhone screens." This applies from April 30.

reactnativelogboxjul20.jpg

LogBox, introduced in version 0.62 as an opt-in feature, becomes the default experience in 0.63 LogBox.   

Image: React Native
Editorial standards