lifecycle

The sequence of stages something goes through from creation to removal, such as starting, running and stopping.

In more detail

Frameworks and platforms let you run code at each stage through hooks or signals. Knowing the lifecycle tells you where setup, cleanup and error handling belong.

Examples

A mutation lifecycle: onMutate, then onError or onSuccess, then onSettled.
Next.js request lifecycle: middleware → route rendering (layouts, pages, Suspense boundaries) → streamed response.

Related terms

Taught in

References