Skip to content

becomex/open-http

 
 

Repository files navigation

open-http

An observable request lib. Use for data operations on a centralized object. Some functionalities: Promise, Data in Memory, Paging in Server or in Memory.This lib depends on open-observable

Recommendations

We recommend other libs from the 'open' universe.

Installation

with npm

  npm install open-form

Or with yarn

  yarn add open-form

Setup

In the index.js file, wrap your components with GlobalObservable to recognize the observables

root.render(
    <React.StrictMode>
        <GlobalObservable>
            <App />
        </GlobalObservable>
    </React.StrictMode>
);

Objects

  • Datasource
  • DatasourceProvider
  • InMemoryDatasourceProvider
  • RequestSource

Hooks

  • useRawDatasource - receive a DatasourceProvider and returns a Datasource<TInput, TOutput>
  • useInMemoryDatasourceProvider - receive an array or Subscriber<T[]> and returns a DatasourceProvider
  • useRequest - receive a function with TInput params and returns a Promise

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 95.0%
  • JavaScript 5.0%