This is a continuation of an previous issue to add support for the BigInt data type in React DevTools.

Original PR https://github.com/facebook/react/pull/17233 (merged)

This happens when you try to copy a BigInt value to clipboard via React DevTools.

![](https://image.prntscr.com/image/c4SnNIPXR1GlSXIt49FOlw.png)

Would @nutboltu mind taking a look?

```
backend.js:1 Uncaught TypeError: Do not know how to serialize a BigInt
    at JSON.stringify (<anonymous>)
    at c (backend.js:1)
    at Object.copyElementPath (backend.js:6)
    at t.<anonymous> (backend.js:6)
    at t.r.emit (backend.js:6)
    at backend.js:32
    at t (backend.js:8)
c @ backend.js:1
copyElementPath @ backend.js:6
(anonymous) @ backend.js:6
r.emit @ backend.js:6
(anonymous) @ backend.js:32
t @ backend.js:8
postMessage (async)
(anonymous) @ contentScript.js:1
<./app-insights/app-insights>:50 Uncaught TypeError: Cannot read property 'message' of null
    at trackError (<./app-insights/app-insights>:50)
    at eval (<./app-insights/app-insights>:22)
trackError @ <./app-insights/app-insights>:50
eval @ <./app-insights/app-insights>:22
setTimeout (async)
eval @ <./app-insights/app-insights>:21
error (async)
initAppInsights @ <./app-insights/app-insights>:17
main @ VM70658 client>:101
main @ ./../../../node_modules/@tessin/tcm/lib/dev/boot-loader:31
async function (async)
main @ ./../../../node_modules/@tessin/tcm/lib/dev/boot-loader:27
(anonymous) @ 219:3435
backend.js:1 Uncaught TypeError: Do not know how to serialize a BigInt
    at JSON.stringify (<anonymous>)
    at c (backend.js:1)
    at Object.copyElementPath (backend.js:6)
    at t.<anonymous> (backend.js:6)
    at t.r.emit (backend.js:6)
    at backend.js:32
    at t (backend.js:8)
c @ backend.js:1
copyElementPath @ backend.js:6
(anonymous) @ backend.js:6
r.emit @ backend.js:6
(anonymous) @ backend.js:32
t @ backend.js:8
postMessage (async)
(anonymous) @ contentScript.js:1
<./app-insights/app-insights>:50 Uncaught TypeError: Cannot read property 'message' of null
    at trackError (<./app-insights/app-insights>:50)
    at eval (<./app-insights/app-insights>:22)
trackError @ <./app-insights/app-insights>:50
eval @ <./app-insights/app-insights>:22
setTimeout (async)
eval @ <./app-insights/app-insights>:21
error (async)
initAppInsights @ <./app-insights/app-insights>:17
main @ VM70658 client>:101
main @ ./../../../node_modules/@tessin/tcm/lib/dev/boot-loader:31
async function (async)
main @ ./../../../node_modules/@tessin/tcm/lib/dev/boot-loader:27
(anonymous) @ 219:3435
backend.js:1 Uncaught TypeError: Do not know how to serialize a BigInt
    at JSON.stringify (<anonymous>)
    at c (backend.js:1)
    at Object.copyElementPath (backend.js:6)
    at t.<anonymous> (backend.js:6)
    at t.r.emit (backend.js:6)
    at backend.js:32
    at t (backend.js:8)
c @ backend.js:1
copyElementPath @ backend.js:6
(anonymous) @ backend.js:6
r.emit @ backend.js:6
(anonymous) @ backend.js:32
t @ backend.js:8
postMessage (async)
(anonymous) @ contentScript.js:1
<./app-insights/app-insights>:50 Uncaught TypeError: Cannot read property 'message' of null
    at trackError (<./app-insights/app-insights>:50)
    at eval (<./app-insights/app-insights>:22)
```
data: cleanedData,
      cleaned: cleanedPaths,
      unserializable: unserializablePaths,
    };
  } else {
    return null;
  }
}
export function copyToClipboard(value: any): void {
  const safeToCopy = serializeToString(value);
  const text = safeToCopy === undefined ? 'undefined' : safeToCopy;
  const {clipboardCopyText} = window.__REACT_DEVTOOLS_GLOBAL_HOOK__;
  
  
  
  
  
  if (typeof clipboardCopyText === 'function') {
    clipboardCopyText(text).catch(err => {});
  } else {
    copy(text);
  }
}
export function copyWithSet(
  obj: Object | Array<any>,
  path: Array<string | number>,
  value: any,
  index: number = 0,
): Object | Array<any> {
  if (index >= path.length) {