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

smh-rn-expo-json-ui-engine

v0.0.13

Published

A JSON-driven UI engine for React Native and Expo that enables dynamic, runtime-rendered interfaces without rebuilding the app.

Readme

smh-rn-expo-json-ui-engine

A JSON-driven UI engine for React Native and Expo that enables dynamic, runtime-rendered interfaces without rebuilding the app.

Note: This package is designed specifically for Expo React Native projects only, and requires Expo SDK version 52 or higher. It may not work in pure React Native (non-Expo) setups.


⚡ Why This Package Matters

In today's mobile app landscape, many applications—especially those powered by chatbots or backend-driven platforms—require the flexibility to render UIs dynamically from a backend source. This package enables exactly that:

  • Ideal for backend-driven UIs or chatbot-driven layouts.
  • Dynamically render components via JSON without code changes or app rebuilds.
  • Built with performance in mind — styles are automatically cached and reused project-wide, reducing memory and rendering overhead.
  • Smart layout strategies and optimization handled internally — you don’t have to manage performance concerns manually.

This makes it a great choice for low-code platforms, headless CMS integrations, and any app that prioritizes flexibility and performance.


✨ Features

  • Render UI directly from JSON

  • Reusable component registry via useComponent

  • Runtime support for:

    • Static JSON
    • Function-based sources
    • RxJS-like observables
  • Built-in support for popular native/Expo components

  • Support for conditional visibility with showIf

  • Style optimization with smh-rn-styles-cache

  • Full TypeScript support


📦 Installation

npm install smh-rn-expo-json-ui-engine
# or
yarn add smh-rn-expo-json-ui-engine

Make sure to install peer dependencies (React Native, Expo, etc.) if not already present.


🚀 Basic Usage

import { JSONUI } from 'smh-rn-expo-json-ui-engine';

const json = {
  type: 'Text',
  value: 'Hello JSON UI',
  props: {
    style: { fontSize: 24 }
  }
};

export default function App() {
  return <JSONUI json={json} />;
}

🔄 Dynamic Source

<JSONUI jsonSource={() => fetchMyJson()} />
<JSONUI jsonSource={myObservable$} />

🧩 Component Registry

import { defineUseComponent } from 'smh-rn-expo-json-ui-engine';

const MyCard = defineUseComponent(
  'MyCard',
  { title: 'Title', subtitle: 'Sub' },
  {
    type: 'ViewContainer',
    wrapperComponent: 'View',
    props: { style: { padding: 10 } },
    properties: [
      { type: 'Text', value: '{{title}}' },
      { type: 'Text', value: '{{subtitle}}' }
    ]
  }
);

<JSONUI json={MyCard} />;

🧱 Supported Components

Containers:

  • ViewContainer: Renders multiple nested components with optional layout.

    • Uses configurable Wrapper components like View, TouchableWithoutFeedback, etc.
  • ListContainer: Standard list with item rendering and custom header/footer support.

  • ViewListContainer: FlashList + wrapper + sticky headers; high-perf for dynamic lists.

Basic Components:

  • Text, TextInput, Button, Image, ImageBackground
  • Slider, Checkbox, DateTimePicker, StatusBar
  • LottieView, GLView, CameraView, VideoView
  • FlashList, LinearGradient, MaskedView, PagerView

🧠 Conditional Rendering

{
  "type": "Text",
  "value": "Only if admin",
  "showIf": "context.user?.isAdmin"
}

Supports boolean expressions or functions.


🤝 Contributing

Contributions are always welcome, no matter how large or small! 🙌

We want this community to be friendly and respectful to each other. Please follow this in all your interactions with the project.

Please feel free to drop me a mail — S MUNI HARISH ([email protected])


🏷️ Keywords

react-native, expo, json-ui, runtime-ui, dynamic-ui, no-code, low-code, mobile-ui-engine, json-renderer, react-native-json, ui-from-json, component-registry, observable-ui, typescript-ui, rxjs-ui, backend-driven-ui, chatbot-ui-engine, expo-sdk-52+

💡 Sponsor & Support

To keep this library maintained and up-to-date, please consider sponsoring it on GitHub.

Or, if you're looking for private support or help in customizing the experience, reach out to me on LinkedIn @smuniharish.

📘 License

Apache-2.0 © S MUNI HARISH


🌐 Links