
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
@simple-api/react-native
Advanced tools
The mobile-optimized adapter for simple-api.
@simple-api/react-native is a thin wrapper around @simple-api/react, specially tuned for mobile development. It ensures your API engine performs optimally in the React Native environment, with planned support for NetInfo and offline storage.
npm install @simple-api/react-native @simple-api/core @tanstack/react-query
One of the greatest strengths of simple-api is sharing your API definition between Web and Mobile:
// shared-api.ts
import { createApi } from "@simple-api/core";
export const apiDefinition = createApi({
baseUrl: "https://api.myapp.com",
services: { ... }
});
// hooks.tsx (Mobile)
import { createReactAdapter } from "@simple-api/react-native";
import { apiDefinition } from "./shared-api";
export const useMobileApi = createReactAdapter(apiDefinition);
import React from "react";
import { View, Text, ActivityIndicator } from "react-native";
import { useMobileApi } from "./hooks";
export const UserScreen = ({ userId }) => {
const { users } = useMobileApi();
const { data, isLoading } = users().get({ params: { id: userId } });
if (isLoading) return <ActivityIndicator />;
return (
<View>
<Text>Name: {data.name}</Text>
</View>
);
};
While the core engine handles retries, on mobile you should frequently use hookOptions to control behavior based on network connectivity:
users().list({
hookOptions: {
retry: 2,
staleTime: 0,
gcTime: 1000 * 60 * 60, // Keep in memory for 1 hour
},
});
When a mobile user navigates away from a screen, TanStack Query (which powers this adapter) automatically handles request cancellation through AbortController, staying battery-efficient.
MIT © Elnatan Samuel
FAQs
React Native adapter for SimpleAPI Engine
The npm package @simple-api/react-native receives a total of 3 weekly downloads. As such, @simple-api/react-native popularity was classified as not popular.
We found that @simple-api/react-native demonstrated a healthy version release cadence and project activity because the last version was released less than 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.