1.0.7 • Published 2 years ago

global-loading-state v1.0.7

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

Global Loading State

This package provides a simple and efficient way to manage global loading states in React applications. It enables the seamless triggering of loading states across any component, serving as a minimalist state management system.

Installation

npm install global-loading-state

usage

import React from 'react';
import GlobalLoading from 'global-loading-state';

const Button = () => (
  <button disabled={GlobalLoading()}>Click Me</button>
);

export default Button;

then You can trigger the loading state from any component by using the eventEmitter to emit a change.

eventEmitter.emit("changeLoading", true);
1.0.7

2 years ago

1.0.6

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago