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

Function encode

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

Source from the content-addressed store, hash-verified

13} from "./types";
14
15export function encode(element: ReactElement<unknown>) {
16 const json = encodeChildren([element]);
17 const stringified = JSON.stringify(json);
18
19 return encodeURIComponent(stringified);
20}
21
22function encodeChildren(children: ReactElement<unknown>[]): EncodedElement[] {
23 const elements: EncodedElement[] = [];

Callers

nothing calls this directly

Calls 1

encodeChildrenFunction · 0.85

Tested by

no test coverage detected