Options
All
  • Public
  • Public/Protected
  • All
Menu

支持生成 React Hooks 代码的相关配置

Hierarchy

  • ReactHooksConfig

Index

Properties

enable

enable: boolean

是否开启该项功能。

Optional pragma

pragma: undefined | string

从何处引入 useState、useEffect 等 Hooks。

default

'react'

Methods

Optional getAutoApiHookName

  • 获取自动触发 API 的 Hook 的名称。

    default

    useAutoApi${changeCase.pascalCase(requestFunctionName)}

    Parameters

    Returns string

    Hook 的名称

Optional getManualApiHookName

  • 获取手动触发 API 的 Hook 的名称。

    default

    useManualApi${changeCase.pascalCase(requestFunctionName)}

    Parameters

    Returns string

    Hook 的名称

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc