Skip to content

The VS Code of video editing, built for agents.

TypeScript
312 B
Raw Blame
import type { World } from 'koota';
import { useContext } from 'solid-js';
import { WorldContext } from './world-context';

export function useWorld(): World {
	const world = useContext(WorldContext);

	if (!world) {
		throw new Error('Koota: useWorld must be used within a WorldProvider');
	}

	return world;
}