rtk-loading
TypeScript icon, indicating that this package has built-in type declarations

1.0.8 • Public • Published

build with @reduxjs/toolkit.

A rtk extraReducer method execution process collector

The execution status of the current method can be obtained from the 【loading.effects】 of the 【store】 every time the createAsyncThunk executes

Judge whether the execution is completed by returning true and false

excemple

import { useLoading } from 'rtk-loading';

const initLoading = loading.effects['app/init']



step1


npm install rtk-loading

step2

import { configureStore } from "@reduxjs/toolkit";
import { loading, effectsLoadingMiddleware } from "rtk-loading";

const store = configureStore({
  reducer: {
    loading: loading,
    //... you reducer
  },
  middleware: (getDefaultMiddleware) => getDefaultMiddleware().concat(effectsLoadingMiddleware),
});

export default store;

step3

import { useLoading } from 'rtk-loading';

const loading = useLoading();

loading.effects['']

/rtk-loading/

    Package Sidebar

    Install

    npm i rtk-loading

    Weekly Downloads

    1

    Version

    1.0.8

    License

    MIT

    Unpacked Size

    13.5 kB

    Total Files

    16

    Last publish

    Collaborators

    • etsvain