Skip to content

v1.1.0

Choose a tag to compare

@stegano stegano released this 04 Jan 16:06
· 28 commits to main since this release

Features

  • feat(hooks): add DataResetHandler function
  • feat(hooks): add Idle status

Refactors

  • refactor(hooks): rename interfaces and add descriptions
  • refactor(hooks): rename DataHandleStatus

BREAKING CHANGES

  • The DataHandlingStatus enum values have been modified. Please refer to the code snippet below:

    // Before
    export enum DataHandlingStatus {
      IN_PROGRESS = "IN_PROGRESS",
      SUCCEEDED = "SUCCEEDED",
      FAILED = "FAILED",
    }
    // After
    export enum DataHandlingStatus {
      IDLE = "IDLE",
      IN_PROGRESS = "IN_PROGRESS",
      COMPLETED = "COMPLETED",
      FAILURE = "FAILURE",
    }
  • With the addition of DataResetHandler, the return value of the useRenderState hook has been changed. Please refer to the code snippet below:

    // Before
    const [render, handleData, state] = useRenderState(...);
    // After
    const [render, handleData, handleDataReset, state] = useRenderState(...);
  • Due to the addition of the Idle state, the render argument has been modified. Please refer to the code snippet below:

    const [render] = useRenderState(...);
    ...
    // Before
    return render("Completed", "Loading", "Failure");
    // After
    return render("Completed", "Idle", "Loading", "Failure");