While adding a function to Object.prototype in React project anywhere, react while showing the Warning: Invalid value for prop `xxx` on tag. And an uncaught TypeError.
React version: 17.0.2
Steps To Reproduce
- Create a react project with create-react-app
- Put the following code anywhere in the project:
Object.prototype.test = function () {}

The current behavior
Getting the warning

Also the Uncaught TypeError: renderer.setTraceUpdatesEnabled is not a function.

The expected behavior
Expected nether warning nor error.