Documents / @faasjs/react

@faasjs/react

React plugin for FaasJS.

License: MITopen in new windowNPM Versionopen in new window

If you use SWRopen in new window or React Query / TanStack Queryopen in new window, please use @faasjs/browseropen in new window directly.

Install

npm install @faasjs/react

Usage

  1. Initialize FaasReactClient
import { FaasReactClient } from '@faasjs/react'

const client = FaasReactClient({
  domain: 'localhost:8080/api'
})
  1. Use faas, useFaas or FaasDataWrapper.

Usage with @preact/signal-reactopen in new window

  1. npm i --save-dev @preact/signals-react-transform
  2. Add @preact/signals-react-transform to babel config:
{
	"plugins": [["module:@preact/signals-react-transform"]]
}
  1. Add import '@preact/signals-react/auto' to your test files.

Classes

Interfaces

Type Aliases

Functions