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 🙏

© 2025 – Pkg Stats / Ryan Hefner

react-native-render-lynx

v0.3.0

Published

Render a LynxJS bundle in your React Native application.

Readme

React Native Render Lynx

Package version MIT license PRs Welcome

Render a LynxJS bundle in your React Native application.

[!WARNING] This library was created out of curiosity to explore LynxJS and see how it could be integrated with React Native. It was a weekend project and is purely a proof of concept. While it works, there may be gotchas or edge cases that I haven't encountered. Use at your own discretion. Contributions are welcome, but please be aware that responses to issues and pull requests may be limited.

Known Issue

LynxJS bundles with images won't work with Android. This is because React Native is shipped with fresco:3.6.0 by default, while LynxJS depends on fresco:2.3.0. Using either version crashes the app. See: https://github.com/lynx-family/lynx/issues/410

Installation

1. Install the package

yarn add react-native-render-lynx
npx pod-install

2. Post-install steps

{
  // ...
  plugins: [
    // ...
+   'react-native-render-lynx',
  ],
  // ...
}
post_install do |installer|
  # ...

+ installer.pods_project.targets.each do |target|
+   if target.name == 'Lynx'
+     target.build_configurations.each do |config|
+       config.build_settings['CLANG_CXX_LANGUAGE_STANDARD'] = 'gnu++17'
+       config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.0'
+     end
+   end
+ end
end

:bulb: You need to re-run npx pod-install.

+ import com.renderlynx.LynxInitializer

class MainApplication : Application(), ReactApplication {
  // ...
  override fun onCreate() {
    super.onCreate()
+   val initializer = LynxInitializer()
+   initializer.initLynxService(applicationContext)
+   initializer.initLynxEnv(this)
    SoLoader.init(this, OpenSourceMergedSoMapping)
    // ...
  }

  // ...
}

Usage

import { View, StyleSheet, Platform } from 'react-native';
import RenderLynxView from 'react-native-render-lynx';

export default function App() {
  // const bundleUrl = 'http://192.168.68.50:3001/main.lynx.bundle?fullscreen=true';
  const bundleUrl = Platform.select({ android: 'noimage.lynx.bundle', default: 'main.lynx.bundle' });

  return (
    <View style={styles.container}>
      <RenderLynxView style={styles.viewStyle} bundleUrl={bundleUrl} />
    </View>
  );
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    padding: 50,
  },
  viewStyle: {
    height: 700,
    width: 300,
    marginTop: 32,
  },
});

Using a Remote Bundle

Run yarn dev, npm run dev, or rspeedy dev in your LynxJS project and copy the bundle URL.

<RenderLynxView bundleUrl='http://192.168.68.50:3001/main.lynx.bundle?fullscreen=true' />

Importing Bundle in Expo Prebuild

{
  // ...
  plugins: [
    // ...
    [
      'react-native-render-lynx',
      {
        bundlePath: './src/main.lynx.bundle',
      },
    ],
  ],
  // ...
}

This will use ./src/main.lynx.bundle on both iOS and Android. If you want to override you can do:

{
  bundlePath: './src/main.lynx.bundle',
  android: {
    bundlePath: './src/noimage.lynx.bundle',
  },
},

This will use ./src/main.lynx.bundle on iOS and ./src/noimage.lynx.bundle on Android.

Importing Bundle in iOS

  1. Open your project on Xcode.
  2. In the target settings of your project, select the target.
  3. Select the Build Phases tab.
  4. In the Copy Bundle Resources section, click the ✚ icon, click the Add Other... button, and select your bundle file.

:bulb: https://developer.apple.com/documentation/xcode/customizing-the-build-phases-of-a-target#View-and-add-build-phases-to-a-target

Importing Bundle in Android

Put your bundle file main.lynx.bundle in android/app/src/main/assets directory.

:bulb: Create the directory if it does not exist.

Creating a Bundle

You can start creating LynxJS bundles by following the official documentation: https://lynxjs.org/guide/start/quick-start.html

Screenshots

react-native-render-lynx-hello-world

Changelogs

See CHANGELOGS.md

License

Copyright © 2025 David Angulo, released under the MIT license, see LICENSE.


Made with create-react-native-library