WhoBuilt

Best Practices

Mar 12, 2021· 10 min· 1.8K views·Watch on YouTube

Speakers

Ram, Monica from Major League Soccer, and other panelists discuss JavaScript performance, app upgrades, and React Native migration at the React Native EU 2020 Conference Q&A panel hosted by Callstack.

Diagnose JavaScript thread slowdowns

Ram describes a performance issue where a busy JavaScript thread delayed button presses. He found that JavaScript profilers that worked with JSC were broken on Hermes, so his team used an internal tool to run a sampling profiler. With support from the MLH Fellowship, two students built and open-sourced a visualization for Hermes profiling.

Treat major upgrades as performance work

Monica says her team’s AndroidX migration was difficult because the app relied on many libraries and substantial native code. Upgrading libraries such as React Navigation added complexity when internal changes and new APIs caused compatibility problems. The migration ultimately brought performance improvements and required work from many engineers.

Plan migrations in compatible chunks

The panel advises teams moving existing native apps to React Native to break the work into stages. Check how the app’s libraries and native components fit with React Native, since third-party tools may need adjustments. Understanding each library’s capabilities and limitations helps teams plan the transition.

Keep native expertise in the team

A panelist cautions against trying to move everything into JavaScript immediately; some native code may still be useful or necessary. At Artsy, teams combined React Native work with native expertise embedded in each team. The panel also emphasizes how the transition affects developers’ roles and skills, and warns that switching to JavaScript is not an automatic budget win.

Build organizational support for the transition

The panel notes that React Native adoption involves existing teams and organizational relationships as well as technology. Teams may need to explain the benefits to native developers and bring them on board. Securing that support is part of making the transition successful.

Takeaways

  • Profile JavaScript thread work when interactions stall, and use Hermes sampling data to locate bottlenecks.
  • Treat framework and library upgrades as compatibility projects that may also yield performance gains.
  • Move a native app to React Native in stages, checking dependencies before each step.
  • Keep native expertise available where the product or team needs it.
  • Account for developer roles and team buy-in when estimating a React Native migration.

Mentioned in this talk

Search inside this talk

What was claimed 5

Related talks