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

Function updateBlock

packages/core/src/components/BlocksContext.tsx:288–291  ·  view source on GitHub ↗

* Does not trigger a re render

(updatedBlock: Block)

Source from the content-addressed store, hash-verified

286 * Does not trigger a re render
287 */
288 function updateBlock(updatedBlock: Block) {
289 blocksRef.current[updatedBlock.id] = updatedBlock;
290 setBlocksOrder(prevState => [...prevState]);
291 }
292
293 function updateBlockV2(blockId: string, blockData: Partial<Block>) {
294 const updatedBlock = updateBlockData(blocksRef.current[blockId], blockData);

Callers 8

handleOnBlurFunction · 0.85
pickImageFunction · 0.85
pickCoverFunction · 0.85
pickIconFunction · 0.85
handleEmojiSelectFunction · 0.85
handleRemoveIconFunction · 0.85
handleRemoveCoverFunction · 0.85
handleSubmitEditingFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected