Skip to content

Releases: TENSIILE/saborter-react

v1.0.0 (February 4th, 2026)

24 Feb 13:48

Choose a tag to compare

What's Changed | 🎉 Initial Release of Saborter-React

New Features

✨ Core Functionality

  • useAborter hook - Saborter instance wrapped React API

📖 Possibilities

  • The aborter field always has the same reference to the Aborter instance.
  • 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