Quantcast
Channel: Active questions tagged react-native+typescript - Stack Overflow
Viewing all articles
Browse latest Browse all 6287

how to get the response from a post typescript method?

$
0
0

how can i use the answer from this function? example, I want to use the value obtained in token and cookie, help

export type UseResponseParams = {  token: string;  cookie: string;};export async function showRec(  request: UseRequestParams,): Promise<UseResponseParams> {  const response = (await client.post(URL, request)) as {    data: UseResponseParams;  };  return response.data;}

tried data.token but it doesn't work


Viewing all articles
Browse latest Browse all 6287

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>