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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@flarelane/react-native-sdk

v1.10.0

Published

FlareLane react-native SDK

Downloads

340

Readme

react-native-flarelane

Welcome to FlareLane!

Installation

npm install @flarelane/react-native-sdk

WebView Bridge (hybrid apps)

For apps that embed pages running the FlareLane Web SDK, the native SDK exposes a bridge so identity (deviceId / userId / projectId) and SDK calls (setUserId, setTags, trackEvent, setUserAttributes, syncDeviceData) stay aligned between native and web.

The bridge name and class name match the native Android/iOS SDKs: FlareLaneJavascriptInterface + BRIDGE_NAME. RN ships a library-named adapter that exposes members 1:1 with react-native-webview's prop and callback slots — drop them into your existing <WebView> wiring.

react-native-webview

import { WebView } from 'react-native-webview';
import { FlareLaneJavascriptInterface } from '@flarelane/react-native-sdk/adapters/react-native-webview';

const webViewRef = useRef<WebView>(null);

// `injectedJavaScript` and `injectedJavaScriptBeforeContentLoaded` carry the
// same string, so one variable can be reused across both slots. If you don't
// have existing injection, drop the `myExistingInjection +` part.
const injection =
  myExistingInjection + FlareLaneJavascriptInterface.injectedJavaScript;

<WebView
  ref={webViewRef}
  source={{ uri }}
  injectedJavaScript={injection}
  injectedJavaScriptBeforeContentLoaded={injection}
  onMessage={FlareLaneJavascriptInterface.onMessage(webViewRef)}
/>

If you already have an onMessage handler, wrap the adapter inside it:

onMessage={async (event) => {
  await FlareLaneJavascriptInterface.onMessage(webViewRef)(event);
  myExistingOnMessage(event);
}}

The adapter exposes:

  • FlareLaneJavascriptInterface.BRIDGE_NAME — channel name constant.
  • FlareLaneJavascriptInterface.injectedJavaScript — JS to inject. Includes the react-native-webview channel adapter and the bridge shim. The same string is valid for both injectedJavaScript and injectedJavaScriptBeforeContentLoaded slots.
  • FlareLaneJavascriptInterface.onMessage(webViewRef) — factory that returns a handler for <WebView onMessage={…}>. The ref is used to evaluate response JS (e.g. the syncDeviceData callback) back into the webview.

Other webview packages

This SDK only ships a first-class adapter for react-native-webview. If you use a different webview library, port the adapter implementation (src/adapters/react-native-webview.ts) to your library's slot names — the JS injection and message routing logic are self-contained inside that file.

Notes

  • The injected JS is idempotent — safe to inject twice.
  • Inject before the Web SDK loads. injectedJavaScriptBeforeContentLoaded works on iOS; Android falls back to injectedJavaScript (post-load). Either way the SDK injection is guarded so multiple injections are safe. For Android specifically, avoid loading the Web SDK as an inline synchronous <script> at the very top of <head>, which could fire before the fallback injection lands.
  • setUserAttributes is available on Android, iOS, Flutter, and React Native SDKs with consistent semantics.

License

MIT