1.0.7 • Published 1 year ago

global-loading-state v1.0.7

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year 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

1 year ago

1.0.6

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago