MCPcopy Create free account
hub / github.com/uiwjs/react-codemirror / Modified

Function Modified

merge/src/Modified.tsx:14–33  ·  view source on GitHub ↗
(props: ModifiedProps)

Source from the content-addressed store, hash-verified

12}
13
14export const Modified = (props: ModifiedProps): JSX.Element | null => {
15 const { extensions = [], value, selection, onChange, ...otherOption } = props;
16 const { theme, dispatch } = useStore();
17 const defaultExtensions = getDefaultExtensions({ ...otherOption, theme });
18 useEffect(() => {
19 dispatch!({
20 modified: {
21 doc: value,
22 selection: selection,
23 extensions: [...defaultExtensions, ...extensions],
24 },
25 modifiedExtension: {
26 onChange,
27 option: otherOption,
28 extension: [extensions],
29 },
30 });
31 }, [props]);
32 return null;
33};
34
35Modified.displayName = 'CodeMirrorMerge.Modified';

Callers

nothing calls this directly

Calls 2

useStoreFunction · 0.90
getDefaultExtensionsFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…