react-api-clients

A npm package for calling APIs in React app

APACHE-2.0 License

Downloads
354
Stars
0

React Api Clients

A npm package for calling APIs in React.

For building the package

npm pkg set main="lib/index.js" types="lib/index.d.ts" scripts.build="tsc" scripts.prepare="npm run build"

Publishing

To publish a new version of the package:

  1. Update the version in package.json
npm version patch
  1. Publish to npm
npm publish

For using the package

npm install react-api-clients
# or
yarn add react-api-clients
# or
pnpm add react-api-clients
# or
bun add react-api-clients

Installation

You can install this package from GitHub Packages

npm install @ttiimmothy/react-api-clients
# or
yarn add @ttiimmothy/react-api-clients
# or
pnpm add @ttiimmothy/react-api-clients
# or
bun add @ttiimmothy/react-api-clients

Usage

import { callApi } from "react-api-clients";

const data = await callApi("https://jsonplaceholder.typicode.com/todos/1");

License

React Api Clients is licensed under the Apache License, Version 2.0. See the LICENSE file for more details.