Без строчки // eslint-disable-next-line
получаем предупреждение:
React Hook React.useEffect has missing dependencies: 'history.location.search' and 'match.params'. Either include them or remove the dependency array react-hooks/exhaustive-deps
Search for the keywords to learn more about each warning.
To ignore, add // eslint-disable-next-line to the line before.
для кода: