@exobase/use-next
TypeScript icon, indicating that this package has built-in type declarations

1.0.0-rc.34 • Public • Published

title: 'useNext' description: 'A root hook to handle the Next.js application framework' group: 'Root Hooks' badge: 'Next.js'

Exobase root hook to handle function running on Next.js api functions

Install

yarn add @exobase/use-next

Import

import { useNext } from '@exobase/use-next'

Usage

import { compose } from 'radash'
import type { Props } from '@exobase/core'
import { useNext } from '@exobase/use-next'

export const pingEndpoint = async (props: Props) => {
  return {
    message: 'pong'
  }
}

export default compose(useNext(), pingEndpoint)

Readme

Keywords

none

Package Sidebar

Install

npm i @exobase/use-next

Weekly Downloads

22

Version

1.0.0-rc.34

License

MIT

Unpacked Size

20.7 kB

Total Files

17

Last publish

Collaborators

  • rayepps