In this [issue](https://github.com/facebook/react/issues/23373), when you navigate to [this app](https://next-rsc-notes.vercel.app/note/1646289027680) and inspect the sidebar in the components tab, you will get this error:

![image](https://user-images.githubusercontent.com/2735514/158241727-64eba8f9-5ac2-4aa7-bffa-ff9b3174a261.png)

 This is a user error. One of the components in the user's app thrown. However, the UI for this is confusing, because it seems like it's a DevTools error. We've gotten a lot of bug reports like this, and it would be good to differentiate between DevTools bugs and bugs in the app. For this task:

- [ ] Build the React DevTools extension locally (instructions [here](https://github.com/facebook/react/tree/main/packages/react-devtools-extensions)) and reproduce the error
- [ ] Figure out a way to have the front end be able to differentiate whether the error is a error within DevTools or within the user's app
- [ ] Design/implement a better UI to help app developers distinguish between these two cases
};
    await utils.actAsync(() => {
      const container = document.createElement('div');
      ReactDOMClient.createRoot(container).render(<Example />);
    }, false);
    shouldThrow = true;
    const value = await inspectElementAtIndex(0, noop, true);
    expect(value).toBe(null);
    const error = errorBoundaryInstance.state.error;
    expect(error.message).toBe('Error rendering inspected component');
    expect(error.stack).toContain('inspectHooksOfFiber');
  });
  describe('$r', () => {
    it('should support function components', async () => {
      const Example = () => {
        const [count] = React.useState(1);
        return count;
      };
      const container = document.createElement('div');
      await utils.actAsync(() =>
        legacyRender(<Example a={1} b="abc" />, container),
      );
      await ins
      expect(global.$r).toMatchInlineSnapshot(`
        Object {
          "hooks": Array [
            Object {
              "hookSource": Object {
                "columnNumber": "removed by Jest serializer",
                "fileName": "react-devtools-shared/src/__tests__/inspectedElement-test.js",