MCPcopy Create free account
hub / github.com/bvaughn/react-resizable-panels / encode

Function encode

integrations/tests/src/utils/serializer/encode.ts:57–62  ·  view source on GitHub ↗
(element: ReactElement<unknown>)

Source from the content-addressed store, hash-verified

55import { IFrame, type IFrameProps } from "../../components/IFrame";
56
57export function encode(element: ReactElement<unknown>) {
58 const json = encodeChildren([element]);
59 const stringified = JSON.stringify(json);
60
61 return encodeURIComponent(stringified);
62}
63
64function encodeChildren(children: ReactElement<unknown>[]): EncodedElement[] {
65 const elements: EncodedElement[] = [];

Callers 3

updateUrlFunction · 0.90
goToUrlFunction · 0.90
goToUrlWithIframeFunction · 0.90

Calls 1

encodeChildrenFunction · 0.85

Tested by

no test coverage detected