UNPKG

@xyflow/svelte

Version:

Svelte Flow - A highly customizable Svelte library for building node-based editors, workflow systems, diagrams and more.

17 lines (16 loc) 357 B
export function hideOnSSR() { let hide = $state(typeof window === 'undefined'); if (hide) { const destroyEffect = $effect.root(() => { $effect(() => { hide = false; destroyEffect?.(); }); }); } return { get value() { return hide; } }; }