Uncaught TypeError: Cannot convert undefined or null to object - When trying to change theme using local state(Toggling between 'dark' and 'light' ). #81
Uncaught TypeError: Cannot convert undefined or null to object
When trying to change theme using local state(Toggling between 'dark' and 'light' ) gives error and UI breaks when loading page with new theme.
To Reproduce
Steps to reproduce the behavior:
Create dropdown to choose between themes (values ['dark', 'light'])
Add onchange handler which will toggle value between dark and light.
pass this theme string in state to getTheme [ Imported from 'react-uwp/Theme'] to change theme dyanamically.
On dropdown change this error fired.
Expected behavior
It should allow to change theme dyanamically.
Additional context
Toggle state between 'dark' and 'light' and passing it to getTheme for react-uwp/theme causes error breaking the UI.
Uncaught TypeError: Cannot convert undefined or null to object When trying to change theme using local state(Toggling between 'dark' and 'light' ) gives error and UI breaks when loading page with new theme.
To Reproduce Steps to reproduce the behavior:
Expected behavior It should allow to change theme dyanamically.
Additional context Toggle state between 'dark' and 'light' and passing it to getTheme for react-uwp/theme causes error breaking the UI.