FaasJS
Home
  • Guide
  • Documents
  • Starter Template
  • Changelog
  • Ecosystem

    • VS Code Plugin
    • Docker Images
  • Github
  • Contributing
  • Sponsor
  • Security
  • English
  • 简体中文
Home
  • Guide
  • Documents
  • Starter Template
  • Changelog
  • Ecosystem

    • VS Code Plugin
    • Docker Images
  • Github
  • Contributing
  • Sponsor
  • Security
  • English
  • 简体中文

Documents / @faasjs/react / usePrevious

Function: usePrevious()

usePrevious<T>(value): T

Hook to store the previous value of a state or prop.

Type Parameters

T

T = any

The type of the value.

Parameters

value

T

The current value to be stored.

Returns

T

  • The previous value, or undefined if there is no previous value.