Javascript Function In The Component Is Getting Called Twice In React

Javascript Function In The Component Is Getting Called Twice In React