@exobase/use-next
v1.0.0-rc.35
Published
Exobase root hook to handle function running on Next.js api functions
Downloads
100
Readme
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)