npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

react-native-performance-flipper-expo-plugin

v1.0.1

Published

React Native Performance Flipper Plugin Support for Expo Apps

Downloads

8

Readme

react-native-performance-flipper-expo-plugin

This is a plugin for react-native-performance-flipper To install react-native-performance for Expo, a few things need to be done in advance.

Usage (Quick Guide)

  1. This plugin does not work with Expo Go, but only with a custom dev client of Expo.

  2. Install the Expo Flipper plugin. Documentation can be found here: Expo Community Flipper. Install the module along with react-native-flipper:

    TL;DR: yarn add --save-dev expo-community-flipper react-native-flipper

  3. Install react-native-performance with yarn add --dev react-native-flipper-performance-plugin. You can also check out React Native Performance. Please do not make the changes manual as described in the README, because thats what this plugin is for. You might need to run npx pod-install though. Before the final version is released you need to use yarn add --dev 'https://gitpkg.now.sh/bamlab/react-native-performance/flipper-native?android-expo-compatibility'

  4. Install this plugin with yarn add --save-dev react-native-performance-flipper-expo-plugin

  5. Add expo-community-flipper configuration to the plugins section of your app.json, as per the examples below. Please check Expo Community Flipper for further settings.

  6. Add this plugin to the plugins section of your app.json after expo-community-flipper

Configuration

{
  "expo": {
    "..."
    "plugins": [
      ["expo-community-flipper"],
      ["react-native-performance-flipper-expo-plugin"]
    ]
  }
}

If you want to pick a specific flipper version or edit the configs, check https://github.com/jakobo/expo-community-flipper

Best practice

React Native Performance helps you to calculate a LightHouse Score similar to PageSpeed Insights. However, the tool is of no use to you if you cannot draw any optimizations from it. That is why it is recommended to use the plugin together with React DevTools.

The easiest way to use React DevTools is to install it as follows:

yarn add --save-dev react-devtools-core

Then open your App.tsx/App.js and import:

import { connectToDevTools } from "react-devtools-core";

if (__DEV__) {
  connectToDevTools({
    host: "localhost",
    port: 8097,
  });
}

Testing

An /example directory is built with expo init example for each major SDK release with a default eas.json file. The plugin is directly linked using expo's filepath support for config plugins. You can run expo prebuild in the directory to verify the plugin is modifying build files appropriately.

example eas.json

{
  "cli": {
    "version": ">= 0.35.0"
  },
  "build": {
    "example": {
      "releaseChannel": "default",
      "channel": "default"
    }
  }
}

example app.json

{
  "expo": {
    "...": "... standard app.json entries ...",
    "plugins": [
      [
        "./../build/withFlipper",
        {
          "Flipper": "0.123.0",
          "ios": {
            "Flipper-Folly": "2.6.10",
            "Flipper-RSocket": "1.4.3",
            "Flipper-DoubleConversion": "3.1.7",
            "Flipper-Glog": "0.3.9",
            "Flipper-PeerTalk": "0.0.4"
          }
        }
      ]
    ]
  }
}

References