react-native-code-editor
react-native-code-editor copied to clipboard
The editor clears the code to initial value upon edit
https://user-images.githubusercontent.com/98604306/178748289-369c9d25-24f3-4bda-8f80-7a37fb1af863.mp4
The code
const [editorCode, setEditorCode] = useState('')
<CodeEditor
style={Styles.codeEditorStyles}
language={ language }
syntaxStyle={CodeEditorSyntaxStyles.atomOneDark}
showLineNumbers
onChange={ value => setEditorCode(value) }
initialValue={ exampleCode }
/>
when i remove onChange={ value => setEditorCode(value) } , there's no issue but i need to get the value
How do i solve that