skip to content
Andrei Calazans

React Native Weekly - W41 2021

/ 3 min read

Welcome to the 29th edition of React Native Weekly!

This is week 41 of 2021: October 4th and 10th.

Update Metro config to use blockList instead of blacklistRE

Summary from commit by Rob Hogan rh389@users.noreply.github.com: An update to metro which landed in metro 0.60 (RN 0.64+) deprecates the config blacklistRE, renaming it to blockList. Although the former is still supported it now generates a deprecation warning.

Fixes to the Appearance API

According to Brent Kelly brentkelly87@gmail.com the Appearance API wasn’t working as expected because of it wasn’t listening to the right context in Android and for iOS there was a bug in the code that caused a mutation to the current color scheme value.

Brent’s commit fixes this.

Use the Appearance module to implement dark/light mode theme aware UIs. The below code will now update as expected:

import { useColorScheme } from 'react-native';
const isDarkMode = useColorScheme() === 'dark';

Update React DevTools from 4.13.0 -> 4.19.1

Commit

Fix multiline TextInput “jerk” movement when moving cursor

This commit by Xiankun Cheng xiankuncheng@gmail.com fixes 30748: on iOS 14, when trying to hold down the space bar and move the cursor on a multi-line TextInput with lots of lines, the cursor could not be scrolled to the desired point. It works as expected on iOS 13 and before.

Video Before:

Video After:

Avoid logging sensitve param values in AppRegistry.runApplication

Commit by Wes Johnson wjohnson@wealthsimple.com who noticed that by default the RootView/ReactView that called runApplication logged all info level props passed to that components. In Wes’ case there were sensitive information there that would leak to the device loss.

Add error handling to RuntimeScheduler

Commit by Samuel Susla samuelsusla@fb.com, he extended the RuntimeScheduler to forward JavaScript errors to ErrorUtils - the error utils is used to add error handlers like the Error redbox in React Native.

Update Modal’s mock to not render its children when it is not visible

Commit by AntoineDoubovetzky antoined@bam.tech who found that when testing if a Modal is visible or not the mocked Modal still rendered its children forcing the unit test to check the visible prop instead of testing if the children rendered. His commit fixes this.

Remove shared responsibility between LogBox and ExceptionsManager native module

Commit by Lulu Wu luluwu@fb.com, there was an overlap between the LogBox and the ExceptionsManager. Now, LogBox will only be responsible for showing the error dialog when in DEV, while the ExceptionsManager will handle reporting the error.

Community

Top 7 myths about Expo in 2021

Software Mansion team wrote a post to debunk a few myths about React Native & Expo. Highlights to:

  • Expo supports custom native libs (except Expo Go apps and classic builds).
  • Ejecting is no longer very buggy and irreversible (now it is fully reversible).
  • Expo’s AES tool now takes care shrinking the size of the final output bundle, making it smaller than before.
  • You can now build Expo apps locally by running expo run:android and expo run:ios.
  • EAS service will be free once they are done testing it in the preview mode.

JSI Template for writing native modules

Michał Osadnik shared a template to write native modules with JSI.

3 Different ways of styling React Native Components

Post by Jode Mejia

Done

That’s it for this week. If you want to see more checkout the previous week’s posts here. Subscribe to get notified when new posts are out = )