MCPcopy Index your code
hub / github.com/blocks/blocks / updateCode

Function updateCode

packages/blocks-ui/src/providers/code.js:36–43  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

34 }, [codeState])
35
36 const updateCode = newCode => {
37 return {
38 code: newCode,
39 transformedCode: transforms.toTransformedJSX(newCode),
40 tree: queries.getElementTree(newCode),
41 blocks: queries.getBlocks(newCode)
42 }
43 }
44
45 const editCode = rawCode => {
46 const code = transforms.addTuid(rawCode)

Callers 7

editCodeFunction · 0.85
cloneCurrentElementFunction · 0.85
removeCurrentElementFunction · 0.85
insertTextFunction · 0.85
updatePropFunction · 0.85
updateSxPropFunction · 0.85
onDragEndFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…