• This simulates the logic of useState but the input is a Date or a number representing the instant. It will always provide a Date and may NOT be null. However, the initial state if it is a function must be return a Date.

    Since null is not a supported value, designate a constant like Date(0) to represent an undefined state.

    Parameters

    • initialState: number | Date | (() => Date)

    Returns [Date, Dispatch<Date | number>]

Generated using TypeDoc