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

Function useCode

packages/blocks-ui/src/providers/code.js:10–14  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

8const CodeContext = React.createContext({})
9
10export const useCode = () => {
11 const value = useContext(CodeContext)
12
13 return value
14}
15
16const CodeProvider = ({ children, initialCode, onChange }) => {
17 const providedBlocks = useBlocks()

Callers 8

editor.jsFile · 0.90
pragma.jsFile · 0.90
editor.jsFile · 0.90
side.jsFile · 0.90
tree.jsFile · 0.90
canvas.jsFile · 0.90
ViewportsModeFunction · 0.90
CodeModeFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…