Avoid referencing unbound methods Typescript 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.
Not sure what this lint rule is meant to catch? What would the suggested fix be?
Closing this as I'm not sure exactly what the issue or suggested fix is. Feel free to re-open with more context. Thanks!