All Projects → marcin-piela → React Fetching Library

marcin-piela / React Fetching Library

Licence: mit
Simple and powerful API client for react 👍 Use hooks or FACCs to fetch data in easy way. No dependencies! Just react under the hood.

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to React Fetching Library

Use Http
🐶 React hook for making isomorphic http requests
Stars: ✭ 2,066 (+268.27%)
Mutual labels:  rest-client, fetch, ssr
mey
A react package that exports hooks for handling the request lifecycle.
Stars: ✭ 18 (-96.79%)
Mutual labels:  fetch, hooks
Fetcher Ts
Type-safe wrapper around Fetch API
Stars: ✭ 87 (-84.49%)
Mutual labels:  rest-client, fetch
React Fetch Hook
React hook for conveniently use Fetch API
Stars: ✭ 285 (-49.2%)
Mutual labels:  hooks, fetch
React Infinite Scroll Hook
A simple hook to create infinite scroll list components
Stars: ✭ 151 (-73.08%)
Mutual labels:  hooks, fetch
Ngx Restangular
Restangular for Angular 2 and higher versions
Stars: ✭ 787 (+40.29%)
Mutual labels:  rest-client, fetch
eventrix
Open-source, Predictable, Scaling JavaScript library for state managing and centralizing application global state. State manage system for react apps.
Stars: ✭ 35 (-93.76%)
Mutual labels:  hooks, ssr
React 5ddm
5d动漫,使用React,服务端渲染,接口(不开源)来自赞片CMS。仅供参考,交流群:14646823 欢迎加入
Stars: ✭ 50 (-91.09%)
Mutual labels:  hooks, ssr
Swr
React Hooks for data fetching
Stars: ✭ 20,348 (+3527.09%)
Mutual labels:  fetch, hooks
Trousers
hooks-first CSS-in-JS library, focused on semantics and runtime performance
Stars: ✭ 295 (-47.42%)
Mutual labels:  hooks, ssr
React Uploady
Modern file uploading - components & hooks for React
Stars: ✭ 372 (-33.69%)
Mutual labels:  hooks, ssr
Tipple
A lightweight dependency-free library for fetching data over REST with React.
Stars: ✭ 133 (-76.29%)
Mutual labels:  hooks, fetch
React Ufo
🛸 react-ufo - A simple React hook to help you with data fetching 🛸
Stars: ✭ 85 (-84.85%)
Mutual labels:  hooks, fetch
Hookrouter
The flexible, and fast router for react that is entirely based on hooks
Stars: ✭ 1,200 (+113.9%)
Mutual labels:  hooks, ssr
Ky Universal
Use Ky in both Node.js and browsers
Stars: ✭ 421 (-24.96%)
Mutual labels:  fetch, ssr
node-fetch-har
Generate HAR entries for requests made with node-fetch
Stars: ✭ 23 (-95.9%)
Mutual labels:  fetch, ssr
Next Blog
基于react(ssr)服务端框架next.js和antd-design搭建的个人博客
Stars: ✭ 214 (-61.85%)
Mutual labels:  fetch, ssr
Ice
🚀 The Progressive App Framework Based On React(基于 React 的渐进式应用框架)
Stars: ✭ 16,961 (+2923.35%)
Mutual labels:  hooks, ssr
React Query
⚛️ Hooks for fetching, caching and updating asynchronous data in React
Stars: ✭ 24,427 (+4254.19%)
Mutual labels:  hooks, fetch
Relay Hooks
Use Relay as React hooks
Stars: ✭ 423 (-24.6%)
Mutual labels:  hooks, ssr

Simple and powerful fetching library for React. Use hooks to fetch data!

Watch on GitHubStar on GitHubTweet


Build Status version downloads MIT License PRs Welcome Code of Conduct Code of Conduct codecov

✅ Zero dependencies (react, react-dom as peer deps)

✅ SSR support

✅ Use hooks or FACC's (Function as Child Components) - depending on your needs

✅ Uses Fetch API (but allows to use custom fetch implemenation and axios as well)

✅ Request and response interceptors allows to easily customize connection with API

✅ React Suspense support (experimental *)

✅ TypeScript support

✅ Error boundaries to catch bad API responses

✅ Less than 3k minizipped

✅ Simple cache provider - easily to extend

✅ Handle race conditions

✅ Allows to abort pending requests


react-fetching-library

Use hooks or FACC's (Function as Child Component) to fetch data in an easy way. No dependencies! Just React under the hood.

Request and response interceptors allows you to easily customize connection with API (add authorization, refresh token, cache, etc). It uses Fetch API so it can be used in SSR apps (i.e. with isomorphic-fetch).

Library allows you to use it with connection of React Suspense (read more about React Suspense) to easily maintain loading state in application.

Documentation

Full documentation is available HERE

Short example of use

import { useQuery } from 'react-fetching-library';

const fetchUsersList = {
  method: 'GET',
  endpoint: '/users',
};

export const UsersListContainer = () => {
  const { loading, payload, error, query } = useQuery(fetchUsersList);

  return <UsersList loading={loading} error={error} users={payload} onReload={query} />;
};

Edit Basic Example

Typescript support

Inspirations

Contributing

Feel free to open PRs and issues to make this library better !

When making a PR, make sure all tests pass. If you add a new feature, please consider updating the documentation or codesandbox examples. Thank you!

Using Suspense to fetch data

For now React Suspense is not production ready to use it for fetch data as described here, so API of our component/hook may change in the future.

License

react-fetching-library is licensed under the MIT license.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].