Utilisation

Wait for required startup work

tsx
import { signal, splash } from 'kuito';

const screen = signal<'loading' | 'home'>('loading');
const loadSession = () => fetch('https://example.com/session');

splash.hold(); // before the first render: keep it up

async function start() {
  await loadSession();
  screen.value = 'home';
  await splash.hide({ fade: true }); // after the home screen is drawn
}

Signatures

ts
(): void

Paramètres

Aucun paramètre.

Retourne

void

Généré depuis les déclarations TypeScript publiques : signatures, props et valeurs par défaut viennent de la source vérifiée, les descriptions de sa JSDoc. Aucune valeur par défaut n'est inventée.