Releases: TENSIILE/saborter-react
Releases · TENSIILE/saborter-react
v1.0.0 (February 4th, 2026)
What's Changed | 🎉 Initial Release of Saborter-React
New Features
✨ Core Functionality
- useAborter hook -
Saborterinstance wrappedReactAPI
📖 Possibilities
- The
aborterfield always has the same reference to theAborterinstance. - Automatically abort the request when the component is unmounted.
- Automatically unsubscribe from all listeners when the component is unmounted.
🎯 Usage Example
import { useAborter } from '@saborter/react';
const Component = () => {
// Create an Aborter instance via the hook
const { aborter } = useAborter();
// Use for the request
const fetchData = async () => {
try {
const data = await aborter.try((signal) => fetch('/api/data', { signal }));
console.log('Data received:', data);
} catch (error) {
console.error('Request error:', error);
}
};
};📦 Distribution
- Available via npm:
npm install @saborter/react - Available via yarn:
yarn add @saborter/react