Skip to main content
Deno 2 is finally here 🎉️
Learn more
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.5.107/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.