
Security News
Deno 2.6 + Socket: Supply Chain Defense In Your CLI
Deno 2.6 introduces deno audit with a new --socket flag that plugs directly into Socket to bring supply chain security checks into the Deno CLI.
@acrool/react-fetcher
Advanced tools
Acrool React Fetcher is a solution for API integration and Auth state management in React projects. It helps you easily manage tokens, make API requests, perform GraphQL queries, and handle authentication flows.
A solution for API integration and token management in React projects
yarn add @acrool/react-fetcher
Add the following to your entry file (e.g. index.tsx):
import "@acrool/react-fetcher/dist/index.css";
Wrap your app with AuthStateProvider and AxiosClientProvider. It is recommended to use AppFetcherProvider to automatically wrap all necessary providers:
import AppFetcherProvider from '@/library/react-fetcher';
ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render(
<AppFetcherProvider>
<App />
</AppFetcherProvider>
);
For Redux Toolkit Query, create baseApi.ts:
import { createGraphQLFetcher } from '@acrool/react-fetcher';
import { createApi } from '@reduxjs/toolkit/query/react';
import { axiosInstance } from '@/library/react-fetcher';
export const baseApi = createApi({
reducerPath: 'api',
baseQuery: async (query, api, extraOptions) => {
// Token handling and refresh are managed automatically
const data = await createGraphQLFetcher(axiosInstance, query.document)(query.args);
return { data };
},
endpoints: () => ({}),
});
import { useAuthState } from '@acrool/react-fetcher';
const { getTokens, updateTokens } = useAuthState();
const { data, refetch } = useGetBookmarkQuery({ variables: { bookmarkId: '1' } });
const handleMockTokenInvalid = () => {
updateTokens(curr => ({
...curr,
accessToken: 'mock-invalid-token',
}));
refetch();
};
const login = useLogin();
const logout = useLogout();
await login({ variables: { input: { account, password } } });
logout();
FAQs
Fetcher library based for Reactjs
The npm package @acrool/react-fetcher receives a total of 14 weekly downloads. As such, @acrool/react-fetcher popularity was classified as not popular.
We found that @acrool/react-fetcher demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers 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
Deno 2.6 introduces deno audit with a new --socket flag that plugs directly into Socket to bring supply chain security checks into the Deno CLI.

Security News
New DoS and source code exposure bugs in React Server Components and Next.js: what’s affected and how to update safely.

Security News
Socket CEO Feross Aboukhadijeh joins Software Engineering Daily to discuss modern software supply chain attacks and rising AI-driven security risks.