A function passed as an argument to another function, to be called later when something finishes.
A callback is a Function you pass to another function, with instructions: 'When you are done, call this function.' The receiving function will call it at the right moment—after an operation completes, after a delay, or when data arrives.
Callbacks are how asynchronous code works. You request data from a Server, pass a callback, and your code continues. When the data arrives, the server calls your callback. Without callbacks, programs would freeze waiting for slow operations.
Callbacks are everywhere in JavaScript. They are used for event handlers, timers, and data fetching. While newer syntax like Async/Await is cleaner, understanding callbacks is crucial for reading code and solving timing problems.
In authentication, OAuth Callback is a specific callback URL that receives the response after a user signs in with an external provider. onAuthStateChange is a Supabase callback listener that fires when auth events occur.
We give you the skills to build, deploy, and own a full product. Professional stack, AI co-pilot, no coding background required.