amplify-hooks

1.0.4 • Public • Published

amplify-hooks

Custom hooks for react and aws-amplify.

Installation

npm install amplify-hooks

Usage

const DataList = () => {
  const { loading, data, error, refetch } = useGatewayGet(params)

  if(loading) {
    return (
      <!-- Display loader -->
    )
  }

  if(error) {
    <!-- Display error message -->
  }

  return (
    <!-- Display Data -->
  )
}

Package Sidebar

Install

npm i amplify-hooks

Weekly Downloads

4

Version

1.0.4

License

ISC

Unpacked Size

1.68 kB

Total Files

4

Last publish

Collaborators

  • lpr-nezzar