Open mario-petrovic opened 4 months ago
I've taken a quick look at profiler and it looks like this isn't necessary since it only renders the dialog once and uses refs afterwards. I'll keep this issue open for now, so feel free to add your thoughts. In any case, it might be worth adding an explanation to the docs - it might be useful to memoize children components passed to dialog as they can be heavy on computation, but the dialog itself is not.
It would be awesome to memoize the main component, as to reduce the unnecessary rerender from the top level component.
I know this is imlicit for new react, it may not memoize implicitly if parent app is in react 18 or lower. It is worth to test it out locally.