When using const { trackEvent } = useTracking();, Typescript throws the following error:
Avoid referencing unbound methods which may cause unintentional scoping of this. If your function does not access this, you can annotate it with this: void or consider using an arrow function instead.
We're using the https://github.com/wesbos/eslint-config-wesbos config. It seems to happen when the function is already an arrow function. The use of other hooks in the same context do not throw this error.
When using
const { trackEvent } = useTracking();
, Typescript throws the following error:Avoid referencing unbound methods which may cause unintentional scoping of this. If your function does not access this, you can annotate it with this: void or consider using an arrow function instead.
We're using the https://github.com/wesbos/eslint-config-wesbos config. It seems to happen when the function is already an arrow function. The use of other hooks in the same context do not throw this error.