Switching between dark and light modes in my application rerenders other parts of the page that have nothing to do with the themes switching. I should also note that I am using React and redux saga to watch for the theme. Not sure if this information is relevant but just putting it out there. When I switch from light to dark or vice versa, some parts of the page does a rerender, which resets some values. For example, my application is a crypto application and I am using a helper file that injects the bitcoin symbol in front of bitcoin values instead of the $ sign, which was the default. Now after switching the theme, the bitcoin symbol changes to the $ sign instead of the bitcoin symbol. My guess is that the util/library/file used to do the symbol check does not run again after the theme switch
There is nothing to do with the Redux-Saga. This is how React works. When some update happens to props or state, it will start to re-render all the necessary components. That doesn’t mean it causes Real DOM to Redraw. It just updates VDOM.
Updating the VDOM doesn't necessarily trigger an update of the real DOM.
If you want to prevent the re-rendering of a specific component, you can use Pure Components in React.