After creating a fresh instant-app from yarn create-app, changing the data variable inside the queryToData() function to anything(string, object) breaks the app with the following error -
TS2322: Type '({ query }: { query: any; }) => { name: string; } | undefined' is
not assignable to type 'queryToData'.
Type '{ name: string; } | undefined' is not assignable to type 'Promise<any>'.
Type 'undefined' is not assignable to type 'Promise<any>'.
The exact issue for this breakdown is not known. A temporary fix would be to make queryToData()async, even if the function does not perform any GET/POST requests.
After creating a fresh instant-app from
yarn create-app
, changing thedata
variable inside thequeryToData()
function to anything(string, object) breaks the app with the following error -The exact issue for this breakdown is not known. A temporary fix would be to make
queryToData()
async
, even if the function does not perform anyGET
/POST
requests.