Skip to content

My personal and preferred API hook for React. Published for use to prevent redundancy and version obsolescence across projects.

License

Notifications You must be signed in to change notification settings

LarsSK06/api-hook

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

61 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

API hook

Status

Publish package to NPM

What is this?

This is my own personal and preferred API hook made myself for React. This is mainly made to prevent redundancy and version obsolescence across my own projects.

Why was this created?

To prevent writing the same code across all my projects, as well as keeping the scripts up to date.

How to use?

  1. Wrap project in the context provider from the package.
  2. Create a configuration. This can be done by either satisfying the Config interface/type, and applying it as a prop to the provider, or using the createConfig function, which returns an object of type Config, which you again apply as a prop.
  3. Use useApi with type parameters to take use of the package/hook.

About

My personal and preferred API hook for React. Published for use to prevent redundancy and version obsolescence across projects.

Topics

Resources

License

Stars

Watchers

Forks