A flexible way to add funny loading messages to webapps with optional react support.
...
import Funnies from 'funnies'; let funnies = new Funnies(); funnies.message(); // "Bending the spoon..."
...
import Funnies from 'funnies'; let funnies = new Funnies([ "foo", "bar", "baz", "hello", "world", ]); funnies.message(); // "baz"
The funnies react component is a drop-in solution to create a simple loading indicator. To keep users interested, the loading message is periodically refreshed (or if you'd rather, this can be turned off.)
interval
: The amount of time before the current message changes.
customMessages
: An array of custom messages to add into the funny message
list.
options
: Options to pass through to the backing Funnies instance's
constructor.
import FunniesComponent from 'funnies/react'; ReactDOM.render(<FunniesComponent />, elem);