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

@webority/mobile-insights

v0.199.1

Published

Product feedback for Webority React Native apps: the NPS question and a feedback button that post to the product's Webority.Insights feedback API.

Readme

@webority/mobile-insights

Product feedback for Webority React Native apps. It gives the app the one NPS question and a feedback button. Both post to the product's Webority Insights feedback API, which the product maps on a prefix (/api/insights/feedback by default).

npm install @webority/mobile-insights

Builds on @webority/mobile-core (the signed-in HTTP client, the error shape) and @webority/mobile-ui (theme, components). Every visible string is a prop with a plain-English default, so the app can translate or reword them.

Peers

| Package | Why | Required | |---|---|---| | expo | mobile-core's modules | yes | | react-native-gesture-handler | mobile-ui needs it | yes |

Provider

Create the client over the app's own signed-in HTTP client, so every call carries the same bearer token, tenant header and refresh handling as the rest of the app.

import { userClient } from '@webority/mobile-core';
import { createInsightsFeedbackClient, InsightsFeedbackProvider } from '@webority/mobile-insights';

const feedbackClient = createInsightsFeedbackClient(userClient, { prefix: '/api/insights/feedback' });

export const App = () => (
  <ThemeProvider>
    <InsightsFeedbackProvider client={feedbackClient}>
      <Navigation />
    </InsightsFeedbackProvider>
  </ThemeProvider>
);

Components

import { FeedbackButton, NpsPrompt } from '@webority/mobile-insights';

<NpsPrompt />;

<FeedbackButton pagePath={route.name} />;
  • NpsPrompt asks the question once per mount, only when the server says it is due. It renders nothing while it loads, when it is not due, and after a load failure. Send is enabled once a score is chosen. Not now is a permanent answer, so the question does not come back.
  • FeedbackButton opens a sheet with one multiline field. Send is disabled while the message is empty or longer than 1000 characters.

Failures show the message the server sends, written for the person. Branch on code if you need to, never show it.

Wire contract

| Route | Body | Response | |---|---|---| | GET {prefix}/nps | | { due: boolean, trigger: string \| null } | | POST {prefix}/nps | { trigger: string, score: number \| null, comment?: string \| null } | 204. A null score is "not now". | | POST {prefix}/comments | { comment: string, pagePath?: string \| null } | 204 |

Every POST sends the header X-Webority-Surface: Mobile. Errors arrive as the standard error body { code, message } and are thrown as InsightsFeedbackApiError.