Skip to content

Commit cf6817e

Browse files
authored
Add doc comments (#1127)
1 parent 3ee7c5f commit cf6817e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

jumble/public/module/charm/sandbox/bootstrap.js

+5
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,15 @@ import * as Babel from "https://esm.sh/@babel/standalone"
77
window.React = React
88
window.ReactDOM = ReactDOM
99
window.Babel = Babel
10+
// if LLM forgets the prefix
1011
window.useState = window.React.useState
1112
window.useEffect = window.React.useEffect
1213
window.useCallback = window.React.useCallback
1314

15+
// bf: this got considerably more complicated when supporting key paths
16+
// but that's because the iframe RPC doesn't support it, so we're emulating it internally
17+
// we should revisit this, it's conceptually simple but I'm not quite sure what the solution looks like
18+
// iframe-ctx.ts is a better place to solve the problem.
1419
window.useReactiveCell = function useReactiveCell(pathOrKey) {
1520
const pathArr = Array.isArray(pathOrKey) ? pathOrKey : [pathOrKey];
1621
const rootKey = pathArr[0]; // the key used for IPC

0 commit comments

Comments
 (0)