🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

@aplus-frontend/aplus-axios-react-preset

Package Overview
Dependencies
Maintainers
8
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aplus-frontend/aplus-axios-react-preset

A react present for @aplus-frontend/axios-core

latest
npmnpm
Version
1.1.0
Version published
Maintainers
8
Created
Source

@aplus-frontend/aplus-axios-react-preset

A repackage axios for aplus frontend team,this is a react axios base preset,you must install @aplus-frontend/axios-core at first.

See detail at https://aplus.aplnk.com/aplus-axios/

To avoid the warning about static functions not consuming context, you can pass the antd App instances to the preset:

import { App } from 'antd';
import { axiosReactPresent } from '@aplus-frontend/aplus-axios-react-preset';
import { defHttp } from '@aplus-frontend/axios-core';

function MyApp() {
  const { modal, message, notification } = App.useApp();

  // Initialize axios with App instances
  const basePlugin = axiosReactPresent({
    locale: 'zh_CN',
    modal,
    message,
    notification
  });

  defHttp.use(basePlugin);

  // ... rest of your app
}

// Wrap your app with App provider
function Root() {
  return (
    <App>
      <MyApp />
    </App>
  );
}

This way, the error modals will properly consume the React context including dynamic themes.

If you don't provide the instances, the preset will fall back to static methods (which work but show a warning).

Keywords

@aplus-frontend/aplus-axios-react-preset

FAQs

Package last updated on 09 Dec 2025

Did you know?

Socket

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.

Install

Related posts