
Security News
/Research
Popular node-ipc npm Package Infected with Credential Stealer
Socket detected malicious node-ipc versions with obfuscated stealer/backdoor behavior in a developing npm supply chain attack.
[](https://www.npmjs.com/package/%40shooontan%2Fuse-apios) [](https://packagephobia.now.sh/result?p=use-apios) [![Build
Custom React hook for axios.
# npm
$ npm install use-apios axios
# or yarn
$ yarn add use-apios axios
import * as React from 'react';
import axios from 'axios';
import useApios from 'useApios'
type GetRes = {
name: string
}
const App: React.FC = () => {
const [{ loading, data, error }, fetch] = useApios(
() => http.get<GetRes>('/api/user')
);
const onClick = React.useCallback(() => {
fetch();
}, []);
return (
<div>
<p>User</p>
{loading && <p>loading</p>}
{error && <p>error: {error.response.status}</p>}
{data && (
<>
<p>{data.name}</p>
</>
)}
<button onClick={onClick}>GET</button>
</div>
);
};
AxiosResponse-Promise returning function.
useApios(() => axios.get('/api'));
const [{ loading, error, data, status, statusText, headers, config }, fetch] = useApios(fn)
default: false.
axios's AxiosError.
axios's response data.
https://github.com/axios/axios#response-schema
The function to exec axios request.
# build use-apios
$ yarn build
# development: localost:3000
$ yarn dev
FAQs
[](https://www.npmjs.com/package/%40shooontan%2Fuse-apios) [](https://packagephobia.now.sh/result?p=use-apios) [
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
/Research
Socket detected malicious node-ipc versions with obfuscated stealer/backdoor behavior in a developing npm supply chain attack.

Security News
TeamPCP and BreachForums are promoting a Shai-Hulud supply chain attack contest with a $1,000 prize for the biggest package compromise.

Security News
Packagist urges PHP projects to update Composer after a GitHub token format change exposed some GitHub Actions tokens in CI logs.