vankop / jsoneditor-react

react wrapper implementation for https://github.com/josdejong/jsoneditor
MIT License
263 stars 106 forks source link

Can't change theme on the fly #74

Open AnnaRainier opened 2 years ago

AnnaRainier commented 2 years ago

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?