1. Getting Started
2. Basic Concepts
3. Handlers
3.0.1 Introduction3.0.2 Data Handler3.0.3 Infinite Handler3.0.4 Update Handler3.0.5 Update Key Handler3.0.6 Delete Handler3.0.7 Delete Key Handler3.0.8 Splice Handler3.0.9 Custom Handler3.1.0 Toggle Key Handler3.1.1 Dont Update Data Handler# Things to Remember# Dont Update Data Handler without filter# Dont Update Data Handler with filter# Dont Update Data Handler with Multi-filter# Dont Update Data Handler - Api Reference3.1.2 callback Handler3.1.3 Dont Update Handler
4. Advanced Concepts
Don't update data Handler
# Things to Remember
- This handler won't update only data.- But it will update loaders,error state, and also toast.- This handler will work only on api calls.
# Dont Update Data Handler without filter
import { HOC, commonConstants, store } from "react-boilerplate-redux-saga-hoc";const { ON_SUCCESS } = commonConstants;const { DEMO_API_CONFIGURATION_CUSTOM_TASK } = props;DEMO_API_CONFIGURATION_CUSTOM_TASK(ON_SUCCESS, {task: {name: "Don't-Update-Data-Handler",},});
# Dont Update Data Handler with filter
import { HOC, commonConstants, store } from "react-boilerplate-redux-saga-hoc";const { ON_SUCCESS } = commonConstants;const { DEMO_API_CONFIGURATION_CUSTOM_TASK } = props;DEMO_API_CONFIGURATION_CUSTOM_TASK(ON_SUCCESS, {task: {name: "Don't-Update-Data-Handler",},filter: ["name"],});
# Dont Update Data Handler with Multi-filter
import { HOC, commonConstants, store } from "react-boilerplate-redux-saga-hoc";const { ON_SUCCESS } = commonConstants;const { DEMO_API_CONFIGURATION_CUSTOM_TASK } = props;DEMO_API_CONFIGURATION_CUSTOM_TASK(ON_SUCCESS, {task: {name: "Don't-Update-Data-Handler",,},filter: [["filter-1"], ["filter-2"], ["filter-2"]],});
# Dont Update Data Handler - Api Reference
Note:- The code below are the built in handler function.- Don't copy and paste this handler, it is already available with this hoc.- You will learn how to create your own custom handler in below.- If you want to customize this handler you can do it.
import { generateTimeStamp } from "../helpers";export const dontUpdateDataHandler = ({ successDataStatusCode }) => ({statusCode,} = {}) => ({statusCode: successDataStatusCode || statusCode,error: false,lastUpdated: generateTimeStamp(),isError: false,});