The scenario here is that a promise-returning function is assigned to an event handler of a React component. There could have been an argument that you'd want to avoid this, since when state is set asynchronously, React could print the "Can not set state in an unmounted component" warning. However, this warning is gone in React 18.
I'd change the configuration of our rule to allow this particular case:
The scenario here is that a promise-returning function is assigned to an event handler of a React component. There could have been an argument that you'd want to avoid this, since when state is set asynchronously, React could print the "Can not set state in an unmounted component" warning. However, this warning is gone in React 18.
I'd change the configuration of our rule to allow this particular case:
The option "attributes" refers to props of JSX elements here.
https://typescript-eslint.io/rules/no-misused-promises/