'Returned type of RTK mutation
I want to use mutation result as props like following code:
function Foo() {
const [updateEmail, result] = useUpdateEmailMutation()
return (
<>
<Bar result={result} />
<Baz result={result} />
</>
I wonder I can give some specific types to result props of Bar other than any type.
interface IProps {
result: any <- here
}
const Foo: React.FC<IProps> = ({result}) => {
...
}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
