Next.js · Senior · Question 50 of 75

Why do Server Actions get encrypted, non-deterministic IDs?

Explanation

Next.js creates IDs for action references and periodically recalculates them between builds; unused Server Actions are removed from the client bundle (dead code elimination). But any used ID is visible in network requests - so permission checks inside the action are mandatory.

Further reading

Problem with a question

Next.js · Senior · question 50

Test yourself

Take the Next.js · Senior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz