MCPcopy Create free account
hub / github.com/PatoSala/react-native-blocks / useBlock

Function useBlock

packages/core/src/components/BlocksContext.tsx:55–58  ·  view source on GitHub ↗
(blockId: string)

Source from the content-addressed store, hash-verified

53}
54
55function useBlock(blockId: string) : Block {
56 const { blocks } = useBlocksContext();
57 return blocks[blockId];
58}
59
60function BlocksProvider({ children, defaultBlocks, extractBlocks }: any) {
61 const blocksRef = useRef({

Callers 1

PageBlockFunction · 0.90

Calls 1

useBlocksContextFunction · 0.85

Tested by

no test coverage detected