The title says it all. Currently, every call of the useMessageGetter hook from @messageformat/react in the render of a component will return a new function which could lead to infinite rerender loops if you put it in the dependencies list of useEffect, etc.
This is more of a question/proposition since I don't have any experience in the development of such API: is it expected to have memoization on a hook like this one, or whether to memoize it or not lays in user space?
The title says it all. Currently, every call of the useMessageGetter hook from @messageformat/react in the render of a component will return a new function which could lead to infinite rerender loops if you put it in the dependencies list of useEffect, etc.
This is more of a question/proposition since I don't have any experience in the development of such API: is it expected to have memoization on a hook like this one, or whether to memoize it or not lays in user space?