BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/Shadcn Kanban Board/use-js-loaded

useJsLoaded

shadcn-kanban-board/use-js-loaded
FreeHook

A React hook that returns `true` once client-side JS has loaded.

Install it

npx shadcn@latest add https://shadcn-kanban-board.com/r/use-js-loaded.json

Source

registry/new-york/hooks/use-js-loaded.tsshadcn-kanban-board.com/r/use-js-loaded.json
1import { useState } from 'react';
2import { useEffect } from 'react';
3
4/**
5 * Hook to check if the JavaScript is loaded.
6 *
7 * @returns - True if the JavaScript is loaded, false otherwise.
8 */
9export function useJsLoaded() {
10 const [loaded, setLoaded] = useState(false);
11
12 useEffect(() => {
13 if (
14 document.readyState === 'complete' ||
15 document.readyState === 'interactive'
16 ) {
17 setLoaded(true);
18 return;
19 }
20
21 const onReady = () => setLoaded(true);
22 document.addEventListener('DOMContentLoaded', onReady);
23 window.addEventListener('load', onReady);
24
25 return () => {
26 document.removeEventListener('DOMContentLoaded', onReady);
27 window.removeEventListener('load', onReady);
28 };
29 }, []);
30
31 return loaded;
32}

Files it writes

  • registry/new-york/hooks/use-js-loaded.ts

Facts

Registry
Shadcn Kanban Board
Type
registry:hook
Access
Free
Files written
1
Licence
the repository states none
First indexed
2026-08-02
Last confirmed
today

Go to the source

shadcn-kanban-board.com janhesters/shadcn-kanban-board on GitHub Raw registry item This item as JSON
BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex