If you want to stop your application from outputting warnings in the browser console, place the following line of code in your application’s index file (index.js
):
console.warn = () => {};
If you want to disable warnings in all other environments except the development environment, do the following:
if (process.env.NODE_ENV !== "development)
console.warn = () => {};