Skip to content

Is store/state per-request or global? #702

Closed Answered by SaltyAom
crishoj asked this question in Q&A
Discussion options

You must be logged in to vote

state and decorate is global as stated in https://elysiajs.com/essential/handler.html#state

State is a global mutable object or state shared across the Elysia app.

resolve and derive is per request as stated in https://elysiajs.com/essential/handler.html#derive

Because derive is assigned once a new request starts

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@crishoj
Comment options

Answer selected by crishoj
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants