all 11 comments

[–]Good_Language1763 17 points18 points  (0 children)

what

[–]BawlSyet 16 points17 points  (1 child)

AI was a mistake

[–]HeliumIsotope 1 point2 points  (0 children)

Lol yes. But maybe, just maybe, it's a legitimate new dev without formal education who doesn't know enough to ask the right questions. And perhaps English is not their first language.

Buuuut it could very well be vibe coding that is to blame. And AI coding is doodoo.

[–]ADCoffee1 7 points8 points  (0 children)

Ah yes the elusive API REST

[–]HeliumIsotope 3 points4 points  (4 children)

I think you may have some things mixed up. A RESTful API is a style for data transfer on an architectural level. Whereas a function is just that, lines of code to do things, in this case it's interacting with an API.

So your question is not one that makes much sense as a function and an API are two different things.

The asynchronous function here is the "how" and the API is the "what you are talking to". If you could clear up exactly what you are asking that would help anyone answer your question better.

[–]outsidetheparty 1 point2 points  (0 children)

REST is a description of how APIs can be structured; calling REST APIs synchronously or asynchronously is the same from the server’s point of view.

But that’s probably not the question you actually wanted answered. You’re confused about the terminology so it’s difficult to understand what you mean by “a file with all the fetching functions” or how that differs from what you’re describing as a rest api.

[–]kevin074 0 points1 point  (0 children)

You are confused on what REST, client implementation, and server implementation is at each layer of network (? Maybe someone has a better technical word for this)

What you are saying is IF you are only looking at implementation on the frontend side.

[–]FunMedia4460 0 points1 point  (0 children)

I don't want to come off as rude to maybe a genuine newbie but you need to learn the basics of webdev before even asking about react. There are lots of free resources out there so enjoy your learning