I've found Why is my React component is rendering twice? which fixed my coding error (setState getting called X times depending in which component it gets called), but do I have a problem with my code now if removing React.StrictMode solved it?
Someone wrote:
This happens is an intentional feature of the React.StrictMode. It only happens in development mode and should help to find accidental side effects in the render phase.