```js
  let foo = {}
  useEffect(() => {
    foo.bar.baz = 43;
  }, []);
```

This asks you to include `foo.bar.baz` into deps. But this doesn't make sense, as you write to it. Instead it should ask to include `foo.bar` into array.

If `foo` is a newly created object in render scope then we might additionally nudge you to `useRef` for it instead. Because otherwise it won't be shared between renders.
setState(state + 1);
                  }, [state]);
                }
              `,
            },
          ],
        },
      ],
    },
    {
      code: normalizeIndent`
        function MyComponent() {
          const ref = useRef();
          const [state, setState] = useState();
          useEffect(() => {
            ref.current = {};
            setState(state + 1);
          }, [ref]);
        }
      `,
      errors: [
        {
          message:
            "React Hook useEffect has a missing dependency: 'state'. " +
            'Either include it or remove the dependency array. ' +
            `You can also do a functional update 'setState(s => ...)' ` +
            `if you only need 'state' in the 'setState' call.`,