jsoneditor-react icon indicating copy to clipboard operation
jsoneditor-react copied to clipboard

Can't change theme on the fly

Open AnnaRainier opened this issue 3 years ago • 0 comments

I was trying to dynamically set editor theme and it doesn't work, if I set it like this const editorTheme = useMemo(() => { return isDark ? 'ace/theme/ambiance' : 'ace/theme/chrome'; }, [isDark]);

theme={editorTheme} it's not working, it just picks up the first theme in condition, how can I change it when toggling between dark and light modes of the app?

AnnaRainier avatar Jan 11 '22 12:01 AnnaRainier