Flipper: The Extensible DevTool Platform for React Native

Rate this content
Bookmark

Are you a React Native developer? Have you always been longing for the rich ecosystem of developer tooling that exists for the web in e.g. Chrome and Firefox? Flipper is Facebooks internal, extensible mobile devtool platform, used the mobile devs that work on the Facebook, WhatsApp, Instagram and many more apps.


Recently the React Native and Flipper team have been working hard to add first class support for React Native as well. This means that monitoring network traffic and performance, using the React Devtools, inspecting device and application logs or even debugging JavaScript can now can now be conveniently done using one coherent tool.


And best of all: Flipper is extensible, so let's build our own plugin while at it!

This talk has been presented at React Summit 2020, check out the latest edition of this React Conference.

FAQ

Flipper is a mobile app development platform developed at Facebook, designed to enhance the debugging and development process for mobile applications, including those built with React Native.

Flipper supports React Native by allowing developers to inspect the React development tree, use React Dev tools, and inspect native elements within their applications to optimize development speed and efficiency.

Key features of Flipper include the ability to inspect network requests, view and modify app preferences, inspect image caches, and utilize various plugins that extend its functionality for more tailored debugging and development.

Yes, Flipper can be used without the Hermes engine. While Hermes provides additional debugger tools for stepping through code, all other features of Flipper are available on any setup.

There are two types of plugins for Flipper: generic plugins, which apply generically across multiple apps and development stacks, and application-specific plugins, which are tailored to provide insights specific to an individual application.

Flipper aids React Native development by providing tools to quickly see changes on screen, inspect application layouts, manage state, and track network requests, thereby making the development process faster and more intuitive.

Yes, Flipper is an open-source platform. Developers are encouraged to contribute by developing new plugins or enhancing the existing capabilities of Flipper.

To start using Flipper, download the platform from the official website, install it, and integrate it with your mobile app project. From there, you can start using its features and plugins to debug and develop your application.

Michel Weststrate
Michel Weststrate
32 min
17 Jun, 2021

Comments

Sign in or register to post your comment.

Video Summary and Transcription

The talk introduces Flipper, a mobile app development platform developed at Facebook, designed to enhance the debugging and development process for mobile applications, including those built with React Native. Flipper supports React Native by allowing developers to inspect the React development tree and native elements, making changes if needed. Key features include inspecting network requests, viewing and modifying app preferences, and utilizing various plugins like the network plugin. Flipper can be used without the Hermes engine, although Hermes provides additional debugger tools. The platform is extensible with generic and application-specific plugins, such as ReactorTron and the Redux debugger. Flipper is open-source, welcoming contributions from developers. To start using Flipper, download it from the official website, install it, and integrate it with your mobile app project. Flipper optimizes the development process by providing tools to quickly see changes on screen, inspect application layouts, manage state, and track network requests.

1. Introduction to Flipper and React Native

Short description:

Welcome to my talk about Flipper, the extensible dev tool platform for React Native. React Native provides a fast feedback loop, optimizing development speed. Flipper is a mobile app development platform developed at Facebook, used by all our mobile engineers. We introduced support for React Native and I'll show you a quick demo. Download Flipper, start the emulator, and load the project. Flipper allows us to inspect the React development tree and native elements, making changes if needed.

♪ Hi, folks. Welcome to my talk about Flipper, the extensible dev tool platform for, among others, React Native. My name is Michel Estrada and I'm working at Facebook on Flipper.

And so at Facebook, we discovered that React Native is quite an awesome development stack for mobile developments. Why? Basically, because it provides this very fast feedback loop. And, basically, it optimizes the time you have between making changes in the code and seeing it on screen. So that's pretty cool and it's pretty important to get a good development speed.

But there's another question we have to ask, and it's like, how fast can you figure out which change you have to make? And so that is basically where Flipper comes in. Flipper is a mobile app development platform developed at Facebook. And it's used by, basically, all of our mobile engineers. And so earlier this year, we introduced support for React Native. And so I'm going to give you a quick show of how that's going to look like.

So first of all, we're going to download Flipper from our website. Now I skipped this part because I already preinstalled it. And when you start Flipper, you see that there's a pretty empty canvas. So for this demo, I've prepared a small application, and in this application, we're going to show some Bitcoin data. So here we have the code. It's a freshly generated React Native project. And the only change I'm going to make is to enable Hermes. And so with that, I'm going to start the emulator, and I'm going to start my project. So that takes a little while, but we're done. It's loading now, and here we have a freshly-made project. And immediately we see that Flipper has a lot of contents. So on the left, there's two sections we can recognize. The first section is our application, so the coins application in this case, and it shows all the plugins that are connected to this application. And so we also see plugins connected to the device itself, for example, the logs. And secondly, we have this connection to the metrobundler itself, so it allows us, for example, to inspect the logs, but also to inspect the React development tree. So with Flipper, we can directly use the React Dev tools and inspect the layouts. But what's even cooler is because Flipper is a tool that was developed for native mobile development, it means that we can also inspect the native elements that are used by native to create our layout. So if you use the layout inspector, we can inspect a certain element and can even make changes to it.

2. Exploring Flipper and Building a Bitcoin App

Short description:

We add native elements used by React Native and explore the available plugins, including image cache inspection, preference modification, and the powerful network plugin. In this demo, we build a small application that shows Bitcoin data using components like coin view and coin item. We can inspect the data using console.log, but Flipper provides richer capabilities such as log level, copying details, and searching. We can also directly inspect network requests.

So for example, if I change the text over here, you will immediately see that that applies to what's happening on the screen. So now we're actually adding the native elements used by React Native. And there's a bunch of more plugins available out of the box, like the image cache inspection, seeing the preferences and modifying them. And a very powerful plugin is the network plugin. So this basically allows you to inspect all the network requests that are being made by our application. And we're going to dive a little bit deeper into that.

So this is basically what you get out of the box if you start Flipper on a fresh React Native project. And now that's what I want to build today for this demo as a small application that shows Bitcoin data like in this mockup. And so I'm going to take a little shortcut and paste some files I already have on my clipboard. And this basically replaced Apps.js and with some UI and some logic that fetches Bitcoin from a remote endpoint. And so we show some Bitcoin data with its own bitting components. So we have this coin view component. It fetches the data and it uses an effect. And then it uses a flatlist to map over all the data and show it. Next there is this coin item component. And that renders mutual records.

So for example, if I have a coin, I can inspect what's in there. So we have rank and icon, but what else is there? One way to figure it out is to use console.log. So I print the data I receive. And let's take a look at Metro Bundler. So what I see now is that it's printing all the data. But I can take a look at the same data from Flipper, which is a not richer. So this is basically the same log. But by viewing this in Flipper, we have a bit more capabilities. So I can fill in log level. I can copy details. I can search. So this is a bit more powerful. And actually, we don't even need that console.log, because we could just have looked directly at the network request that are being sent. So for example, I can inspect one of those network requests.

QnA

Check out more articles and videos

We constantly think of articles and videos that might spark Git people interest / skill us up or help building a stellar career

Modern Web Debugging
JSNation 2023JSNation 2023
29 min
Modern Web Debugging
Top Content
This Talk discusses modern web debugging and the latest updates in Chrome DevTools. It highlights new features that help pinpoint issues quicker, improved file visibility and source mapping, and ignoring and configuring files. The Breakpoints panel in DevTools has been redesigned for easier access and management. The Talk also covers the challenges of debugging with source maps and the efforts to standardize the source map format. Lastly, it provides tips for improving productivity with DevTools and emphasizes the importance of reporting bugs and using source maps for debugging production code.
The Future of Performance Tooling
JSNation 2022JSNation 2022
21 min
The Future of Performance Tooling
Top Content
Today's Talk discusses the future of performance tooling, focusing on user-centric, actionable, and contextual approaches. The introduction highlights Adi Osmani's expertise in performance tools and his passion for DevTools features. The Talk explores the integration of user flows into DevTools and Lighthouse, enabling performance measurement and optimization. It also showcases the import/export feature for user flows and the collaboration potential with Lighthouse. The Talk further delves into the use of flows with other tools like web page test and Cypress, offering cross-browser testing capabilities. The actionable aspect emphasizes the importance of metrics like Interaction to Next Paint and Total Blocking Time, as well as the improvements in Lighthouse and performance debugging tools. Lastly, the Talk emphasizes the iterative nature of performance improvement and the user-centric, actionable, and contextual future of performance tooling.
pnpm – a Fast, Disk Space Efficient Package Manager for JavaScript
DevOps.js Conf 2022DevOps.js Conf 2022
31 min
pnpm – a Fast, Disk Space Efficient Package Manager for JavaScript
pnpm is a fast and efficient package manager that gained popularity in 2021 and is used by big tech companies like Microsoft and TikTok. It has a unique isolated node module structure that prevents package conflicts and ensures each project only has access to its own dependencies. pnpm also offers superior monorepo support with its node module structure. It solves the disk space usage issue by using a content addressable storage, reducing disk space consumption. pnpm is incredibly fast due to its installation process and deterministic node module structure. It also allows file linking using hardlinks instead of symlinks.
Raising the Bar: Our Journey Making React Native a Preferred Choice
React Advanced Conference 2023React Advanced Conference 2023
29 min
Raising the Bar: Our Journey Making React Native a Preferred Choice
Watch video: Raising the Bar: Our Journey Making React Native a Preferred Choice
This Talk discusses Rack Native at Microsoft and the efforts to improve code integration, developer experience, and leadership goals. The goal is to extend Rack Native to any app, utilize web code, and increase developer velocity. Implementing web APIs for React Native is being explored, as well as collaboration with Meta. The ultimate aim is to make web code into universal code and enable developers to write code once and have it work on all platforms.
Opensource Documentation—Tales from React and React Native
React Finland 2021React Finland 2021
27 min
Opensource Documentation—Tales from React and React Native
Documentation is often your community's first point of contact with your project and their daily companion at work. So why is documentation the last thing that gets done, and how can we do it better? This talk shares how important documentation is for React and React Native and how you can invest in or contribute to making your favourite project's docs to build a thriving community
Bringing React Server Components to React Native
React Day Berlin 2023React Day Berlin 2023
29 min
Bringing React Server Components to React Native
Top Content
Watch video: Bringing React Server Components to React Native
React Server Components (RSC) offer a more accessible approach within the React model, addressing challenges like big initial bundle size and unnecessary data over the network. RSC can benefit React Native development by adding a new server layer and enabling faster requests. They also allow for faster publishing of changes in mobile apps and can be integrated into federated super apps. However, implementing RSC in mobile apps requires careful consideration of offline-first apps, caching, and Apple's review process.

Workshops on related topic

React, TypeScript, and TDD
React Advanced Conference 2021React Advanced Conference 2021
174 min
React, TypeScript, and TDD
Top Content
Featured WorkshopFree
Paul Everitt
Paul Everitt
ReactJS is wildly popular and thus wildly supported. TypeScript is increasingly popular, and thus increasingly supported.

The two together? Not as much. Given that they both change quickly, it's hard to find accurate learning materials.

React+TypeScript, with JetBrains IDEs? That three-part combination is the topic of this series. We'll show a little about a lot. Meaning, the key steps to getting productive, in the IDE, for React projects using TypeScript. Along the way we'll show test-driven development and emphasize tips-and-tricks in the IDE.
Mastering advanced concepts in TypeScript
React Summit US 2023React Summit US 2023
132 min
Mastering advanced concepts in TypeScript
Top Content
Featured WorkshopFree
Jiri Lojda
Jiri Lojda
TypeScript is not just types and interfaces. Join this workshop to master more advanced features of TypeScript that will make your code bullet-proof. We will cover conditional types and infer notation, template strings and how to map over union types and object/array properties. Each topic will be demonstrated on a sample application that was written with basic types or no types at all and we will together improve the code so you get more familiar with each feature and can bring this new knowledge directly into your projects.
You will learn:- - What are conditional types and infer notation- What are template strings- How to map over union types and object/array properties.
Integrating LangChain with JavaScript for Web Developers
React Summit 2024React Summit 2024
92 min
Integrating LangChain with JavaScript for Web Developers
Featured Workshop
Vivek Nayyar
Vivek Nayyar
Dive into the world of AI with our interactive workshop designed specifically for web developers. "Hands-On AI: Integrating LangChain with JavaScript for Web Developers" offers a unique opportunity to bridge the gap between AI and web development. Despite the prominence of Python in AI development, the vast potential of JavaScript remains largely untapped. This workshop aims to change that.Throughout this hands-on session, participants will learn how to leverage LangChain—a tool designed to make large language models more accessible and useful—to build dynamic AI agents directly within JavaScript environments. This approach opens up new possibilities for enhancing web applications with intelligent features, from automated customer support to content generation and beyond.We'll start with the basics of LangChain and AI models, ensuring a solid foundation even for those new to AI. From there, we'll dive into practical exercises that demonstrate how to integrate these technologies into real-world JavaScript projects. Participants will work through examples, facing and overcoming the challenges of making AI work seamlessly on the web.This workshop is more than just a learning experience; it's a chance to be at the forefront of an emerging field. By the end, attendees will not only have gained valuable skills but also created AI-enhanced features they can take back to their projects or workplaces.Whether you're a seasoned web developer curious about AI or looking to expand your skillset into new and exciting areas, "Hands-On AI: Integrating LangChain with JavaScript for Web Developers" is your gateway to the future of web development. Join us to unlock the potential of AI in your web projects, making them smarter, more interactive, and more engaging for users.
Introducing FlashList: Let's build a performant React Native list all together
React Advanced Conference 2022React Advanced Conference 2022
81 min
Introducing FlashList: Let's build a performant React Native list all together
Top Content
WorkshopFree
David Cortés Fulla
Marek Fořt
Talha Naqvi
3 authors
In this workshop you’ll learn why we created FlashList at Shopify and how you can use it in your code today. We will show you how to take a list that is not performant in FlatList and make it performant using FlashList with minimum effort. We will use tools like Flipper, our own benchmarking code, and teach you how the FlashList API can cover more complex use cases and still keep a top-notch performance.You will know:- Quick presentation about what FlashList, why we built, etc.- Migrating from FlatList to FlashList- Teaching how to write a performant list- Utilizing the tools provided by FlashList library (mainly the useBenchmark hook)- Using the Flipper plugins (flame graph, our lists profiler, UI & JS FPS profiler, etc.)- Optimizing performance of FlashList by using more advanced props like `getType`- 5-6 sample tasks where we’ll uncover and fix issues together- Q&A with Shopify team
Detox 101: How to write stable end-to-end tests for your React Native application
React Summit 2022React Summit 2022
117 min
Detox 101: How to write stable end-to-end tests for your React Native application
Top Content
WorkshopFree
Yevheniia Hlovatska
Yevheniia Hlovatska
Compared to unit testing, end-to-end testing aims to interact with your application just like a real user. And as we all know it can be pretty challenging. Especially when we talk about Mobile applications.
Tests rely on many conditions and are considered to be slow and flaky. On the other hand - end-to-end tests can give the greatest confidence that your app is working. And if done right - can become an amazing tool for boosting developer velocity.
Detox is a gray-box end-to-end testing framework for mobile apps. Developed by Wix to solve the problem of slowness and flakiness and used by React Native itself as its E2E testing tool.
Join me on this workshop to learn how to make your mobile end-to-end tests with Detox rock.
Prerequisites- iOS/Android: MacOS Catalina or newer- Android only: Linux- Install before the workshop
How to Build an Interactive “Wheel of Fortune” Animation with React Native
React Summit Remote Edition 2021React Summit Remote Edition 2021
60 min
How to Build an Interactive “Wheel of Fortune” Animation with React Native
Top Content
Workshop
Oli Bates
Oli Bates
- Intro - Cleo & our mission- What we want to build, how it fits into our product & purpose, run through designs- Getting started with environment set up & “hello world”- Intro to React Native Animation- Step 1: Spinning the wheel on a button press- Step 2: Dragging the wheel to give it velocity- Step 3: Adding friction to the wheel to slow it down- Step 4 (stretch): Adding haptics for an immersive feel