Browse Source

chore(dev): react key warnings

charlie 1 year ago
parent
commit
ac3b643a11
1 changed files with 4 additions and 1 deletions
  1. 4 1
      src/main/frontend/utils.js

+ 4 - 1
src/main/frontend/utils.js

@@ -15,7 +15,10 @@ if (typeof window === 'undefined') {
   console.error = (...args) => {
     if (args[0]?.startsWith(
       `Warning: Each child in a list should have a unique "key" prop`)) {
-      return console.warn(...args)
+      console.groupCollapsed('[React] ⚠️ key warning!')
+      console.warn(...args)
+      console.groupEnd()
+      return
     }
     originalError(...args)
   }