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

redux-bootstrap-flash

v0.0.2

Published

Easy flash messaging in your bootstrap styled React/Redux apps!

Readme

redux-bootstrap-flash

MVP approved bootstrap styled flash messages.

redux-bootstrap-flash is a small react-redux component that allows you to quickly implement a flash messaging system in your bootstrap@3 styled applications. It's tiny and dead simple to use and has minimal configuration.

Just dispatch the flash action and the next user click, the flash message will disappear. It's as simple as that!

Works perfect with any redux integrated bootstrap3 or react-bootstrap application and can quickly and effectively get feedback to your users with minimal interruption to your UI.

Demo


Give it a quick test run!


Behavior

When you dispatch a showFlash method at any point in your application life cycle, the flash message will pop up wherever you have placed the component and disappear on the next user click!

Install

yarn add react redux react-redux bootstrap@3

then

yarn add redux-bootstrap-flash

Getting Started

  1. Add flashState to your rootReducer. Always connect the state through combineReducers and do not change the name.
import { flashState } from 'redux-bootstrap-flash';
const rootReducer = combineReducers({flashState});
  1. Add the Flash component wherever you want to display the flash message. The component must be able to keep keep track of flashState.show state by either being connected directly to redux or having been passed through as a prop.
const MyComponent = (props) => (
  <div>
   {props.flashState.show ? <Flash /> : null}
  </div>
)
  1. Dispatch flash actions. redux-bootstrap-flash exposes an action creator called 'showDispatch'.

The actionCreator,

From a connected component.

  import { showFlash, hideFlash } from 'redux-bootstrap-flash';

  const style='danger';
  const message= 'Watch out! This message is a dangerous message!'

  class MyConnectedComponent extend Component{
    render(){
      return(
        <div>
          {showFlash(style, message)}
        </div>
      )
    }
  }

from a thunk

import { showFlash } from 'redux-bootstrap-flash';

const style='danger';
const message= 'Watch out! This message is a dangerous message!'

const action = () => (dispatch) => {
  const data = someAsyncCallThatReturnsAnError();
  dispatch(showFlash('My message goes here or I can pass something like data.err'))
}

TODOS

  • [ ] More ability to customize styles and behavior coming soon.