0.0.57 • Published 10 days ago

@app-studio/react-request v0.0.57

Weekly downloads
-
License
MIT
Repository
github
Last release
10 days ago

React Request

npm version npm License: MIT styled with prettier

✨ Features

📦 Install

npm install react-request --save

🔨 Usage

import {useRequest, UseRequestOption} from "react-request";

export const postDataRequest = (
  requestBody?: DataBody,
): Promise<Data> => {
  return  await fetch({
    method: 'POST',
    path: `/api/data`,
    body: requestBody,
  });
};

export const usePostDataService = (
  options: UseRequestOption = {},
): {
  run: (requestBody?: DataBody) => void;
  data: any;
  loading: boolean;
  error?: Error;
  params?: any;
} => {
  return useRequest(postDataRequest, options);
};

TypeScript

react-request is written in TypeScript with complete definitions.

🔗 Links

🤝 Contributing PRs Welcome

Read our contributing guide and let's build a better rize-network together.

We welcome all contributions. Please read our CONTRIBUTING.md first. You can submit any ideas as pull requests or as GitHub issues. If you'd like to improve code, check out the Development Instructions and have a good time! :)

If you are a collaborator, please follow our Pull Request principle to create a Pull Request with collaborator template.

Let's fund issues in this repository

❤️ Sponsors and Backers npm.io npm.io

npm.io

npm.io

Author

SteedMonteiro, steed@rize.network

License

React Request is available under the MIT license. See the LICENSE file for more info.

0.0.47

10 days ago

0.0.51

10 days ago

0.0.52

10 days ago

0.0.53

10 days ago

0.0.54

10 days ago

0.0.55

10 days ago

0.0.56

10 days ago

0.0.57

10 days ago

0.0.50

10 days ago

0.0.48

10 days ago

0.0.49

10 days ago

0.0.42

6 months ago

0.0.43

6 months ago

0.0.44

6 months ago

0.0.45

6 months ago

0.0.46

6 months ago

0.0.39

2 years ago

0.0.37

2 years ago

0.0.38

2 years ago

0.0.36

2 years ago

0.0.30

2 years ago

0.0.31

2 years ago

0.0.32

2 years ago

0.0.33

2 years ago

0.0.34

2 years ago

0.0.35

2 years ago

0.0.27

2 years ago

0.0.28

2 years ago

0.0.29

2 years ago

0.0.20

2 years ago

0.0.22

2 years ago

0.0.23

2 years ago

0.0.12

2 years ago

0.0.24

2 years ago

0.0.13

2 years ago

0.0.25

2 years ago

0.0.14

2 years ago

0.0.26

2 years ago

0.0.15

2 years ago

0.0.16

2 years ago

0.0.17

2 years ago

0.0.18

2 years ago

0.0.19

2 years ago

0.0.10

2 years ago

0.0.11

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.2

2 years ago