@thecodingmachine/redux-toolkit-wrapper
TypeScript icon, indicating that this package has built-in type declarations

2.0.1 • Public • Published
Logo

Redux Toolkit Wrapper License Redux Toolkit Wrapper Version Redux Toolkit Wrapper Release Date Redux Toolkit Wrapper Download Redux Toolkit Wrapper Stars Redux Toolkit Wrapper Top Language Redux Toolkit Wrapper TypeScript

TheCodingMachine Redux-toolkit wrapper

This project is a Redux-toolkit wrapper used to write less code regarding classic CRUD operations.
It's mainly used inside this RN Boilerplate : thecodingmachine/react-native-boilerplate

Installation

yarn add @thecodingmachine/redux-toolkit-wrapper

Usage

import {
  buildAsyncState,
  buildAsyncReducers,
  buildAsyncActions,
} from '@thecodingmachine/redux-toolkit-wrapper'
import fetchOneUserService from '@/Services/User/FetchOne'

export default {
  initialState: buildAsyncState('fetchOne'),
  action: buildAsyncActions('user/fetchOne', fetchOneUserService),
  reducers: buildAsyncReducers({
    errorKey: 'fetchOne.error', // Optionally, if you scoped variables, you can use a key with dot notation
    loadingKey: 'fetchOne.loading',
  }),
}

More information on the dedicated documentation

License

This project is released under the MIT License.

About us

TheCodingMachine is a web and mobile agency based in Paris and Lyon, France. We are constantly looking for new developers and team leaders and we love working with freelancers. You'll find an overview of all our open source projects on our website and on Github.

/@thecodingmachine/redux-toolkit-wrapper/

    Package Sidebar

    Install

    npm i @thecodingmachine/redux-toolkit-wrapper

    Weekly Downloads

    803

    Version

    2.0.1

    License

    MIT

    Unpacked Size

    131 kB

    Total Files

    35

    Last publish

    Collaborators

    • aum_tcm
    • jed_tcm