MCPcopy Index your code
hub / github.com/loggerhead/json4u / useDisplayExample

Function useDisplayExample

src/containers/editor/editor/Editor.tsx:105–114  ·  view source on GitHub ↗
(kind: Kind)

Source from the content-addressed store, hash-verified

103}
104
105function useDisplayExample(kind: Kind) {
106 const editor = useEditor("main");
107 const incrEditorInitCount = useStatusStore((state) => state.incrEditorInitCount);
108
109 useEffect(() => {
110 if (kind === "main" && editor && incrEditorInitCount() <= 1) {
111 editor.parseAndSet(example);
112 }
113 }, [editor]);
114}

Callers 1

EditorFunction · 0.85

Calls 3

useEditorFunction · 0.90
incrEditorInitCountFunction · 0.85
parseAndSetMethod · 0.80

Tested by

no test coverage detected