13 lines
338 B
TypeScript
13 lines
338 B
TypeScript
/**
|
|
* Composable for getting the visible node ids from the store.
|
|
*
|
|
* @internal
|
|
* @param onlyRenderVisible
|
|
* @returns array with visible node ids
|
|
*/
|
|
export function useVisibleNodeIds(onlyRenderVisible: boolean) {
|
|
const nodeIds = useStore(useCallback(selector(onlyRenderVisible), [onlyRenderVisible]), shallow)
|
|
|
|
return nodeIds
|
|
}
|