This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Here is an small example of the issues I face when using Redux and Redux Toolkit with other libraries hooks | |
keep in mind that it is something I have been facing for quite some time, if you have a better solution then go ahead I am all ears here (really) | |
maybe I am not using Redux properly or misusing it or there might be a better way of handling this situation but I am up for feedback and suggestions | |
hooks like useNavigate from @reach/router or toast from react-toastify expect to be found within a Provider (which is expected) | |
my coding pattern is that when I write my dispatch functions, I tend to write them away from the component and import it as a single function | |
that perform everything under the hood, keeping my components more readable and clean to look at |