How What
How What
TTCTheo's Typesafe Cult
Created by How What on 2/14/2023 in #questions
Rule of hooks error
Hello, I'm discovering T3 Stack and I'm struggling with the react rule of hooks. I would like to call this query :
const onPlaylistClick = () => {
const { data: songsList } = api.spotify.songsList.useQuery(
"3rsOyZnnXMBOiyBVVvpacn",
);
console.log(songsList);
};
const onPlaylistClick = () => {
const { data: songsList } = api.spotify.songsList.useQuery(
"3rsOyZnnXMBOiyBVVvpacn",
);
console.log(songsList);
};
When I click on my button Is there any way to call the query like a mutation ? Thanks in advance !
11 replies