Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions jumble/public/module/charm/sandbox/bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,15 @@ import * as Babel from "https://esm.sh/@babel/standalone"
window.React = React
window.ReactDOM = ReactDOM
window.Babel = Babel
// if LLM forgets the prefix
window.useState = window.React.useState
window.useEffect = window.React.useEffect
window.useCallback = window.React.useCallback

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