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

@myappsinsight/react

v0.1.1

Published

React components for MyAppsInsight feedback widget

Readme

@myappsinsight/react

React components for integrating MyAppsInsight feedback widget in React and Next.js applications.

Installation

npm install @myappsinsight/react
# or
yarn add @myappsinsight/react
# or
pnpm add @myappsinsight/react

Quick Start

1. Wrap your app with the provider

import { MyAppsInsightProvider } from '@myappsinsight/react'

function App() {
  return (
    <MyAppsInsightProvider
      apiKey="your-api-key"
      apiUrl="https://api.ragopor.com"
    >
      {/* Your app content */}
    </MyAppsInsightProvider>
  )
}

2. Add the widget component

import { MyAppsInsightWidget } from '@myappsinsight/react'

function YourPage() {
  return (
    <>
      <h1>Your Page Content</h1>
      <MyAppsInsightWidget />
    </>
  )
}

Next.js Integration

App Router

// app/layout.tsx
import { MyAppsInsightProvider } from '@myappsinsight/react'

export default function RootLayout({ children }) {
  return (
    <html>
      <body>
        <MyAppsInsightProvider apiKey="your-api-key">
          {children}
        </MyAppsInsightProvider>
      </body>
    </html>
  )
}

Pages Router

// pages/_app.tsx
import { MyAppsInsightProvider } from '@myappsinsight/react'

export default function MyApp({ Component, pageProps }) {
  return (
    <MyAppsInsightProvider apiKey="your-api-key">
      <Component {...pageProps} />
    </MyAppsInsightProvider>
  )
}

Client-Only Rendering

For SSR frameworks, you may want to render the widget only on the client:

import dynamic from 'next/dynamic'

const MyAppsInsightWidget = dynamic(
  () => import('@myappsinsight/react').then(mod => mod.MyAppsInsightWidget),
  { ssr: false }
)

API Reference

MyAppsInsightProvider

Provider component that manages widget state and configuration.

<MyAppsInsightProvider
  apiKey="required-api-key"
  apiUrl="https://api.myappsinsight.com"
  config={{
    position: 'bottom-right',
    theme: 'auto',
    user: {
      email: '[email protected]',
      name: 'John Doe',
    },
    metadata: {
      version: '1.0.0',
      environment: 'production',
    },
    debug: false,
    captureConsoleErrors: true,
    captureNetworkErrors: true,
  }}
>
  {children}
</MyAppsInsightProvider>

MyAppsInsightWidget

Widget component that renders the feedback button and form.

<MyAppsInsightWidget
  position="bottom-right"  // 'bottom-right' | 'bottom-left' | 'top-right' | 'top-left'
  theme="auto"            // 'light' | 'dark' | 'auto'
  hideDefaultButton={false}
  customButton={<CustomButton />}
/>

useMyAppsInsight Hook

Hook for programmatic control of the widget.

const {
  // State
  isOpen,
  isLoading,
  error,
  
  // Methods
  openFeedback,
  closeFeedback,
  submitFeedback,
  captureScreenshot,
  updateUser,
  updateMetadata,
  
  // Config
  config,
} = useMyAppsInsight()

Examples

Custom Trigger Button

function CustomFeedbackTrigger() {
  const { openFeedback } = useMyAppsInsight()
  
  return (
    <button onClick={openFeedback}>
      Report an Issue
    </button>
  )
}

Programmatic Submission

function QuickBugReport() {
  const { submitFeedback, captureScreenshot } = useMyAppsInsight()
  
  const handleQuickReport = async () => {
    const screenshot = await captureScreenshot()
    
    await submitFeedback({
      type: 'bug',
      title: 'Quick Bug Report',
      description: 'Something went wrong on this page',
      screenshot,
    })
  }
  
  return <button onClick={handleQuickReport}>Quick Bug Report</button>
}

Update User Context

function UserProfile() {
  const { updateUser } = useMyAppsInsight()
  
  useEffect(() => {
    // Update user info when it changes
    updateUser({
      email: currentUser.email,
      name: currentUser.name,
      id: currentUser.id,
    })
  }, [currentUser])
  
  return <div>...</div>
}

Custom Styled Widget

<MyAppsInsightWidget
  customButton={
    <div className="custom-feedback-button">
      <Icon name="feedback" />
      <span>Send Feedback</span>
    </div>
  }
/>

TypeScript Support

This package is written in TypeScript and includes type definitions out of the box.

import type { FeedbackData, MyAppsInsightConfig } from '@myappsinsight/react'

Browser Support

  • Chrome, Firefox, Safari, Edge (latest versions)
  • React 16.8+ (requires hooks support)
  • Next.js 12+

Migration from Vanilla Widget

If you're currently using the vanilla JavaScript widget in a React app:

  1. Remove the script tag loading widget.js
  2. Install @myappsinsight/react
  3. Wrap your app with MyAppsInsightProvider
  4. Add MyAppsInsightWidget component
  5. Update any custom integrations to use the useMyAppsInsight hook

License

MIT