MCPcopy Create free account
hub / github.com/uiwjs/react-markdown-preview / Example

Function Example

website/src/App.tsx:38–52  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

36let val = 1;
37
38export const Example = () => {
39 const [value, setValue] = useState(code);
40 return (
41 <EditorWrapper>
42 <button onClick={() => setValue('# Markdown ' + val++)}>set value</button>
43 <textarea
44 placeholder="Please enter the Markdown code!"
45 value={value}
46 spellCheck="false"
47 onChange={(e) => setValue(e.target.value)}
48 />
49 <MarkdownPreview className="editor-preview" source={value} />
50 </EditorWrapper>
51 );
52};
53
54const FooterWrapper = styled.footer`
55 text-align: center;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…