Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/netzo/deps/usehooks-ts.ts>useStep

Full-stack Deno framework for building business web apps like internal tools, dashboards, admin panels and automated workflows.
Go to Latest
function useStep
import { useStep } from "https://deno.land/x/netzo@0.4.62/deps/usehooks-ts.ts";

Custom hook for managing and navigating between steps in a multi-step process.

Examples

const [currentStep, { goToNextStep, goToPrevStep, reset, canGoToNextStep, canGoToPrevStep, setStep }] = useStep(3); // Access and use the current step and provided helper functions.

Parameters

maxStep: number
  • The maximum step in the process.

Returns

[number, Helpers]

An tuple containing the current step and helper functions for navigating steps.