New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

net4j-loading-plugin

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

net4j-loading-plugin

Handle every request when loading

latest
npmnpm
Version
1.0.12
Version published
Maintainers
1
Created
Source

net4j-loading-plugin

Easily to set loading toast when request pending.

import Net from 'net4j';
import { message } from 'antd';
import NetLoading, { PluginConfig } from 'net4j-loading-plugin';

// Merge plugin config to net4j config,then you can use it in every requst in net4j
declare module 'net4j' {
  interface Config extends PluginConfig {}
}

const net = new Net({
  plugins: [
    new NetLoading({
      loading: message.loading,
      defaultLoadingText: '加载中...', // Default is 'loading'
    }),
  ]
});

// When api/goods is pending, message loading will display and close when request finish;
await net.get('api/goods');

Keywords

http

FAQs

Package last updated on 03 Jul 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts