Open jalaj711 opened 2 years ago
@jalaj711 I'd like to work on this, but I'm going to scope my PR to just switching over the snackbar functionality which will be a pattern that can be followed by the other use cases.
@tygee713 Sounds good. Please go ahead. Happy Hacking!
With a basic infrastructure already implemented by @tygee713, I think other open source enthusiasts, especially first time contributors can move ahead with implementing redux for other window.** functions, using his PR as an example.
List of functions to be converted:
Right now, to make global changes like changing the title or showing the snackbar and even for accessing the database, the app basically attaches a property to the global
window
object. This is not a good approach as it is unreliable and type support also does not work. Rather than this, it would be much better if we use redux to create and manage a global state and then use actions to make requisite changes during runtime.