-
-
Notifications
You must be signed in to change notification settings - Fork 142
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Waiting to render when typed quickly #449
Comments
Hi, I have the same problem. The solution is to avoid creating a theme ( |
import CodeMirror from '@uiw/react-codemirror';
export default function App() {
const [code, setCode] = useState('');
return (
<CodeMirror
value="console.log('hello world!');"
height="200px"
- onChange={setCode}
/>
);
} It's a matter of controlled |
i'm having the same issue with controlled value props. editor lags when we type more text |
are there any workarounds @jaywcjlove |
i think we can solve this by introducing an initialValue prop. this way we wont need to do a document update as in here react-codemirror/core/src/useCodeMirror.ts Line 164 in 6f14c51
|
Hi,
I am facing an issue about performance. When i type quickly i have to wait about 200ms to 500ms for the editor to render my expressions. I have checked the example page of repository (https://uiwjs.github.io/react-codemirror/) and realized that the same issue occurs there.
Is there a way to improve performance while i am consuming the wrapper or is this a render issue in the implementation of wrapper?
PS. I don't know if it is related but when i type a character cm-editor regenerate a class name that contains "min-height, height, max-height, width, min-width, max-width" css rules. Is it necessary to regenerate class name but i think it is render impact on DOM
Thanks in advance
The text was updated successfully, but these errors were encountered: