Type 'Promise<void | object[]>' is not assignable to type 'Promise<object[]>'. Type 'void | object[]' is not assignable to type 'object[]'. Type 'void' is not assignable to type 'object[]'.ts(2322) code example
Example: Type 'Promise' is not assignable to type 'void | (() => void)'.
useEffect(() => {
const genRandomKey = async () => {
console.log(await ecc.randomKey())
};
genRandomKey();
}, []);