This is a very simple library designed to work with React and Redux to display a basic, highly customizable, message popup.
This component can be installed using
npm install --save react-error
To make the component available, simply drop the component into a section of your application that is common throughout your application. A common header or footer is usually a good place to drop the component:
Connect the reducer to your state object as follows:
;const rootReducer =;
Finally, in order to trigger the popup simply dispatch the
Set the message text to be displayed.
Set the css class used to style the message text.
Set the heading text for the popup.
Set the css class used to style the heading texts.
Clear the message text and close the popup. This is called by default when a user clicks the X while the popup is open.
The default css styling for the popup is:
Any of the css styling can be overriden by specifying
.react-error before the style as follows: