# useProtectedDataHandler

Execute the specified handler once the modules are ready, the active route is protected and, when applicable, Mock Service Worker is also ready.

# Reference

useProtectedDataHandler(handler)

# Parameters

  • handler: A void function.

# Returns

Nothing

# Usage

import { useProtectedDataHandler } from "@squide/firefly";

useProtectedDataHandler(() => {
    console.log("The modules are ready and the active route is protected!");
});