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 🙏

© 2024 – Pkg Stats / Ryan Hefner

@react-stateless-dialog/core

v0.4.0-beta1

Published

react-stateless-dialog is a powerful React & React Native library that allows developers to effortlessly show important information to users within their apps. With a range of versatile features, including a customizable snackbar, a global progress modal,

Downloads

33

Readme

react-stateless-dialog

react-stateless-dialog is a powerful React & React Native library that allows developers to effortlessly show important information to users within their apps. With a range of versatile features, including a customizable snackbar, a global progress modal, and a convenient dialog manager, this library simplifies the process of delivering essential messages to your user without the need of managing painful states.

Key Features:

  • DialogManager: Effortlessly push dialogs using a simple React hook.
  • SnackbarManager: Display eye-catching snackbar to instantly grab user attention. Customize the content and appearance of the snackbar to suit your app's branding and requirements.
  • ProgressManager: Easily manage global progress indicators that inform users about ongoing background tasks or operations. Show progress, loading spinners to provide real-time feedback on the status of actions.

Installation & Setup

This library is under active development, it consists on 3 packages:

  • @react-stateless-dialog/core: An abstraction layer that manage state & managers
  • @react-stateless-dialog/web: The React implementation to use on Web (currently not available, under development)
  • @react-stateless-dialog/native: The React Native implementation to use on mobile

Use on React Web

IN PROGRESS

Use on React Native

yarn add @react-stateless-dialog/core @react-stateless-dialog/native

# The library rely on react-native-reanimated & react-native-safe-area-context, you need to install these packages in your project
yarn add react-native-reanimated react-native-safe-area-context

Setup react-native-reanimated:

// Add this to your babel.config.js :
plugins: ['react-native-reanimated/plugin']

Setup the provider:

import React from 'react';
import 'react-native-reanimated';
import { SafeAreaProvider } from 'react-native-safe-area-context';
import { overrideStatelessDialogConfig, StatelessDialogProvider } from '@react-stateless-dialog/core';
import { StatelessDialogConfigNative } from '@react-stateless-dialog/native';

// The config should be immutable and placed outside of the component
const statelessDialogConfig = overrideStatelessDialogConfig(StatelessDialogConfigNative, {
    // Customize the provider
});

function App() {
    return (
        // Note: SafeAreaProvider is required to make the library working
        <SafeAreaProvider>
            <StatelessDialogProvider config={statelessDialogConfig}>
                {/* App Content */}
            </StatelessDialogProvider>
        </SafeAreaProvider>
    );
}

Usage

The full documentation is available here : https://pale-rook-06c.notion.site/React-Stateless-Dialog-d0ca1a2ee958454aa0ade7c9bddfa81f?pvs=4