skip to content
Andrei Calazans

React Native Weekly - W12 2021

/ 2 min read

I’m testing a new format of weekly post where I compile list of udpates React Native had, I might also share things about React Native’s community as a whole. If you want to stay update subscribe!

React Native Radio Podcast About Flutter V2.0.0

Infinite Red team went over what is Flutter and what updates it received plus their perspectives on how Flutter compares to React Native.

I wrote a badly written long text on the what is important to know when comparing Flutter with React Native if you are serious about the comparison.

Check out Moti

This is an awesome library for transitions in React Native. https://github.com/nandorojo/moti

PressabilityPerformanceEventListener

c4c0065b00 Add PressabilityPerformanceEventEmitter

Facebook added an event listener that allows you to get touch-related performance events

Events are:

export type PressabilityTouchSignal =
  | 'DELAY'
  | 'RESPONDER_GRANT'
  | 'RESPONDER_RELEASE'
  | 'RESPONDER_TERMINATED'
  | 'ENTER_PRESS_RECT'
  | 'LEAVE_PRESS_RECT'
  | 'LONG_PRESS_DETECTED';

source

LeakChecker

This tool checks for memory leaks in native components when its surface stopped.

From an internal Facebook commit:

Introducing LeakChecker. A tool that checks if all native components have been cleaned up when surface is stopped.

void LeakChecker::checkSurfaceForLeaks(SurfaceId surfaceId) const {
   auto weakFamilies = registry_.weakFamiliesForSurfaceId(surfaceId);
   uint numberOfLeaks = 0;
   for (auto const &weakFamily : weakFamilies) {
     auto strong = weakFamily.lock();
     if (strong) {
       ++numberOfLeaks;
     }
   }
   if (numberOfLeaks > 0) {
     LOG(ERROR) << "[LeakChecker] Surface with id: " << surfaceId
                << " has leaked " << numberOfLeaks << " components out of "
                << weakFamilies.size();
   }

Virtualized Default Props Being Removed

This was a suprise to me actually. There wasn’t any discussion in the community about it, so I presume it was an internal decision.

e928f54d76 Remove initialNumToRender defaultProps
f293d41ead Back out “Update typed export and fix test”, Back out “[VirtualizedSectionList] Remove defaultProps”, Back out “[VirtualizedList] Remove keyExtractor defaultProps”
f1cf2c39f9 Remove defaultProps
1cbedb95ec Remove keyExtractor defaultProps
76b6a66f4f Remove updateCellsBatchingPeriod defaultProps
b3101457a6 Remove windowSize defaultProps
3c5fa3b642 Remove scrollEventThrottle defaultProps
e3c3ef0ace Remove onEndReachedThreshold defaultProps
69030a480c Remove maxToRenderPerBatch defaultProps
cbc3d90fd4 Remove horizontal from defaultProps
3ff7e86b0f Remove disableVirtualization from defaultProps