
Security News
The Hidden Blast Radius of the Axios Compromise
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.
react-hooks-toolbox
Advanced tools
Collection of Hooks.
Note: React 16.8+ is required for Hooks.
npm i react-hooks-toolbox
yarn add react-hooks-toolbox
yarn install or npm installnpm i json-server or yarn add global json-server(Get a full fake REST API with zero coding in less than 30 seconds (seriously))yarn run run:serveryarn run startuseAxiosGet()GET request
url: string: The request URL.axiosInsance: axios: (OPTIONAL) The custom axios instance.options: object: (OPTIONAL) Config option of axios.delay: number: (OPTIONAL) Request delay.successCb: function: (OPTIONAL) Callback triggered when the request was successfully executed.failedCb: function: (OPTIONAL) Callback triggered when the request returned an error.onlyDispathcIf: bool: (OPTIONAL) Only the request is dispatched when this property is truecontrolledFetch: bool: (OPTIONAL) This property causes the request to run only when the dispatchFetch function is calledObject containing:
status: string: Request status.response: object: Request response.error: object: Request error.dispatchFetch: function: Dispatched request if controlledFetch property is true.import { useAxiosGet } from "react-hooks-toolbox";
const ListPosts = () => {
const { status, response } = useAxiosGet({
....
});
......
};
useAxiosPost()POST request
url: string: The request URL.axiosInsance: axios: (OPTIONAL) The custom axios instance.options: object: (OPTIONAL) Config option of axios.delay: number: (OPTIONAL) Request delay.successCb: function: (OPTIONAL) Callback triggered when the request was successfully executed.failedCb: function: (OPTIONAL) Callback triggered when the request returned an error.onlyDispathcIf: bool: (OPTIONAL) Only the request is dispatched when this property is truecontrolledFetch: bool: (OPTIONAL) This property causes the request to run only when the dispatchFetch function is calledObject containing:
status: string: Request status.response: object:` Request response.error: object: Request error.dispatchFetch: function: Dispatched request if controlledFetch property is true.import { useAxiosPost } from "react-hooks-toolbox";
const AddPost = () => {
const [title, setTitle] = useState("");
const [author, setAuthor] = useState("");
const { status, response, dispatchFetch } = useAxiosPost({
url: "http://localhost:3001/posts",
controlledFetch: true,
options: {
data: {
title: title,
author: author
}
},
successCb: response => {
console.log(response);
}
});
return (
<div>
<input value={title} onChange={e => setTitle(e.target.value)} />
<input value={author} onChange={e => setAuthor(e.target.value)} />
<button onClick={() => dispatchFetch()}>Add Post</button>
</div>
);
};
useGoogleApiInit()This Hook is designed for load https://apis.google.com/js/api.js, initialize Google API and handle sign status.
initConf: object: object for Initialize the gapi.client.init(args).Object containing:
gapiStatus: string: init This status determines when is safe to use windows["gapi"] and gapi is initialized.gapiError: object | string: null The errors thrown.signed: boolean: false Sign status.userProfile: object: null User's basic profile information and token.useDymoCheckService()Return the status of DYMO Label Web Service
port: number:(OPTIONAL) The port of running DYMO Label Web Service.status: string: "init": "init" | "loading" | "success" | "error" Status of DYMO Label Web Service.useDymoFetchPrinters()Returns the available DYMO Labelwriter Printer
statusDymoService: string: The status of DYMO Label Web Service.modelPrinter: string: The model of label writer printer.port: number: The port of running DYMO Label Web Service.Object containing:
statusDymoFetchPrinters: string: "init": "init" | "loading" | "success" | "error" Status of loading printers.printers: array: [] The list of available DYMO Printer.useDymoOpenLabel()Render Label
statusDymoService: string: The status of DYMO Label Web Service.labelXML: xml file: XML file.port: number:(OPTIONAL) The port of running DYMO Label Web Service.Object containing:
labelstatusOpenLabel: string: "init": "init" | "loading" | "success" | "error" Status of render label.errorOpenLabelimport { useDymoOpenLabel, useDymoCheckService } from "react-hooks-toolbox";
const DymoLabelPreview = () => {
const statusDymoService = useDymoCheckService();
const { label, statusOpenLabel, errorOpenLabel } = useDymoOpenLabel(
statusDymoService,
xmlFile
);
if (label) {
return (
<img src={"data:image/png;base64," + label} alt="dymo label preview" />
);
} else {
return null;
}
};
FAQs
React hooks toolbox
We found that react-hooks-toolbox demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

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.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.