React interval hook
  • Introduction
  • Installation
  • Basics
  • Advanced
    • Definition
    • Callback
    • Interval
    • Options
      • Configuration
        • Auto start
        • Immediate callback call
        • Self correction
      • Callbacks
        • On finish
    • Hook result / Controls
      • Start
      • Stop
      • Is active
  • Examples
    • Advanced usage
    • Live demo
      • Version 1
  • Migration
    • Change log
Powered by GitBook
On this page

Was this helpful?

  1. Advanced
  2. Hook result / Controls

Is active

PreviousStopNextAdvanced usage

Last updated 1 year ago

Was this helpful?

Name

isActive

Type

() => boolean

Description

Return current interval timer status - after calling it will be true and after calling it will be false.

Currently obtaining hook status is achieved using isActive() method because it does not trigger unnecessary component re-renders when hook status changes. In the future it will be possible to opt-in for stateful version (variable holding current hook status instead of a method).

start
stop