Skip to content

aaron-hutton/react-launch-component

Repository files navigation

React Launch Component

Launch dialogs or notifications in your react app from anywhere.

Quick Features

  • No need to clutter components with isOpen state for dialogs
  • Group all of your apps dialogs in one place
  • Pass arguments to your dialogs or notifications with full type-safety
  • Launch your components from anywhere

Motivation

Sometimes it's useful to be able to launch a dialog or notification as a function call, such as on a button click or after a server call. This library a type-safe way to do that without cluttering your component.

Simply pass a list of the dialogs or notifications into the provider, call the hook in your component and you can launch your dialogs without any extra state. You can even pass type-safe arguments directly into your dialogs.

Ready to learn more? Check our our example.

Install

To install simply run

npm i react-launch

and blast off!

🚀