MCPcopy
hub / github.com/bvaughn/react-error-boundary / encode

Function encode

integrations/vite/tests/utils/serializer/encode.ts:34–39  ·  view source on GitHub ↗
(element: ReactElement<unknown>)

Source from the content-addressed store, hash-verified

32} from "./types";
33
34export function encode(element: ReactElement<unknown>) {
35 const json = encodeChildren([element]);
36 const stringified = JSON.stringify(json);
37
38 return encodeURIComponent(stringified);
39}
40
41function encodeChildren(children: ReactElement<unknown>[]): EncodedElement[] {
42 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

Used in the wild real call sites across dependent graphs

searching dependent graphs…