All Projects → Eureka-Shoulders → fetchx

Eureka-Shoulders / fetchx

Licence: MIT License
Beautiful way to fetch data in React

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to fetchx

Redux Requests
Declarative AJAX requests and automatic network state management for single-page applications
Stars: ✭ 330 (+364.79%)
Mutual labels:  fetch, http-client, axios
miniprogram-network
Redefine the Network API of Wechat MiniProgram (小程序网络库)
Stars: ✭ 93 (+30.99%)
Mutual labels:  fetch, axios
Fetch
Asynchronous HTTP client with promises.
Stars: ✭ 29 (-59.15%)
Mutual labels:  fetch, http-client
fitch.js
A lightweight Promise based HTTP client, using Fetch API.
Stars: ✭ 35 (-50.7%)
Mutual labels:  fetch, http-client
Wretch
A tiny wrapper built around fetch with an intuitive syntax. 🍬
Stars: ✭ 2,285 (+3118.31%)
Mutual labels:  fetch, http-client
Vue Video
vue + vue-router + vuex + (fetch->axios)
Stars: ✭ 251 (+253.52%)
Mutual labels:  fetch, axios
cute-http
一个基于axios封装的更易用的http库。
Stars: ✭ 18 (-74.65%)
Mutual labels:  http-client, axios
React Ufo
🛸 react-ufo - A simple React hook to help you with data fetching 🛸
Stars: ✭ 85 (+19.72%)
Mutual labels:  fetch, axios
axios-case-converter
Axios transformer/interceptor that converts snake_case/camelCase
Stars: ✭ 114 (+60.56%)
Mutual labels:  http-client, axios
vue-methods-promise
Let Vue methods support return Promise
Stars: ✭ 35 (-50.7%)
Mutual labels:  fetch, axios
fetch-wrap
extend WHATWG fetch wrapping it with middlewares
Stars: ✭ 21 (-70.42%)
Mutual labels:  fetch, http-client
Mande
600 bytes convenient and modern wrapper around fetch
Stars: ✭ 154 (+116.9%)
Mutual labels:  fetch, axios
Php Fetch
A simple, type-safe, zero dependency port of the javascript fetch WebApi for PHP
Stars: ✭ 95 (+33.8%)
Mutual labels:  fetch, http-client
fennch
Modern fetch-based axios-like HTTP client for the browser and node.js
Stars: ✭ 12 (-83.1%)
Mutual labels:  fetch, http-client
Fetcher Ts
Type-safe wrapper around Fetch API
Stars: ✭ 87 (+22.54%)
Mutual labels:  fetch, http-client
beccaccino
Beccaccino is an easy, sexy, reliable, framework agnostic http client for redux that is ⚡️beccaccino fast!
Stars: ✭ 13 (-81.69%)
Mutual labels:  fetch, axios
fetchingInReact
💎📷 Fetching data from Unsplash.com in React
Stars: ✭ 23 (-67.61%)
Mutual labels:  fetch, axios
Cross Fetch
Universal WHATWG Fetch API for Node, Browsers and React Native.
Stars: ✭ 1,063 (+1397.18%)
Mutual labels:  fetch, http-client
Vue Fetch Data
A simple and declarative way to fetch data for Vue components.
Stars: ✭ 65 (-8.45%)
Mutual labels:  fetch, axios
mobxSpa
企业级SPA项目,完整开发脚手架
Stars: ✭ 96 (+35.21%)
Mutual labels:  mobx, axios

FetchX

npm NPM GitHub Workflow Status npm

FetchX is a fetching library made for React built with axios and mobx that give you an easy way to handle CRUD of entities.

Installation

Using npm:

npm i @euk-labs/fetchx mobx mobx-react-lite

Using yarn:

yarn add @euk-labs/fetchx mobx mobx-react-lite

Dependencies

  • Axios is used to fetch data from HTTP requests
  • MobX is used to generate Stores and Hooks powered by these stores to make a beautiful reactive way to control the data on your interfaces.

Usage

HttpService

The HttpService is a class that will work as a wrapper for axios. It will handle all the requests and provide helpers to make your life easier.

Repository

Repositories will abstract the CRUD operations of your entities. No state is stored in the repository, it only provides methods to fetch, create, update and delete entities.

ListStore

ListStores are a set of states and actions built with MobX to handle a list of entities with resources like pagination, filters and inifinite scroll strategies. They need a repository to work and know how to fetch the data.

Please read the MobX documentation to know more about the different ways to make your components reactive.

useList

A hook to use the ListStore in your components. It will return the current state of the ListStore and the actions to interact with it. Like ListStore, it needs a repository to work.

EntityStore

In contrast with the ListStore, EntityStores can only handle a single entity. It can be used to fetch the entity by an identifier, update the loaded entity and delete it.

useEntity

A hook to use the EntityStore in your components. It will return the current state of the EntityStore and the actions to interact with it. Like EntityStore, it needs a repository to work.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT

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].