React-hook wrapper around sceneToAdapter. Memoizes on scene,
options.selection, options.commitInsert, options.insertLayer, and
options.layouts so the adapter identity is stable across renders unless
one of those changes.
Saves the per-demo useMemo(() => sceneToAdapter(scene, { selection }), [scene, selection]) boilerplate every consumer that wires custom tools
would otherwise repeat.
React-hook wrapper around
sceneToAdapter. Memoizes onscene,options.selection,options.commitInsert,options.insertLayer, andoptions.layoutsso the adapter identity is stable across renders unless one of those changes.Saves the per-demo
useMemo(() => sceneToAdapter(scene, { selection }), [scene, selection])boilerplate every consumer that wires custom tools would otherwise repeat.