Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@abidta
Copy link
Owner

@abidta abidta commented May 28, 2024

const response:ResponseExpectedType = {
  name: 'foo',
  age:25 
}

const {data,fetchData} = useApi<ResponseExpectedType>()
//you can access response propreties
console.log(data?.name,data?.age)

default type is any. it maybe null

@abidta abidta merged commit d8e21b1 into main May 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants