Closed VagnerNico closed 4 years ago
To give some context to this pull request, I use your lib to show some alerts on my redux-sagas, like when there are a response error or internet issues, forwarding the dialog as an action parameter because I can't call a hook inside sagas. So, assigning one of those actions in the useEffect and the dialog in the array of dependencies triggers useEffect each time my component re-render. This pull request fixes these re-renders by not reassigning the dialog object on each MuiBox Dialog re-render.
@VagnerNico The fix has been released. Thank you!
I had a problem recently in my application that makes my app rerenders multiple times, so removing the dialog from the render method and turning him to be a class object prevent those rerenders.
Done