The gatsby-browser.js API file
gatsby-browser.js lets you respond to actions within the browser, and wrap your site in additional components. The Gatsby Browser API gives you many options for interacting with the client-side of Gatsby.
wrapRootElement exist in both the browser and Server-Side Rendering (SSR) APIs. If you use one of them, consider if you should implement it in both
To use Browser APIs, create a file in the root of your site at
gatsby-browser.js. Export each API you want to use from this file.