(props: ModifiedProps)
| 12 | } |
| 13 | |
| 14 | export 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 | |
| 35 | Modified.displayName = 'CodeMirrorMerge.Modified'; |
nothing calls this directly
no test coverage detected
searching dependent graphs…