where do we fetch the api
Answered
Transvaal lion posted this in #help-forum
Transvaal lionOP
do we fetch the api directly in the file we want to get the data or in a services folder or in an actions file ?
Answered by Asian black bear
There is no strict rules whether you fetch directly in a component or call a reusable function for that. It's up to you and your desired architecture.
2 Replies
Asian black bear
There is no strict rules whether you fetch directly in a component or call a reusable function for that. It's up to you and your desired architecture.
Answer
@Asian black bear There is no strict rules whether you fetch directly in a component or call a reusable function for that. It's up to you and your desired architecture.
Transvaal lionOP
Great thank you @Asian black bear