QuizzesServer Actions — Concept Check
intermediate
nextjs

Server Actions — Concept Check

Questions on Server Actions. A function that runs on the server, called from the client as if it were local. It removes the API route from the middle of every write — and it is a public endpoint, whatever it looks like.

8 minutes 8 questions Pass at 70%
Time Limit
8 minutes - timer starts when you begin
Change Answers Freely
Revisit and change any answer before submitting
Full Review After Submit
Correct answers and explanations shown for every question
Auto-submit on timeout
Quiz submits automatically when time runs out

Questions in this quiz

8 questions on Server Actions — Concept Check. Work through them here, then start the quiz to answer them and see your score.

  1. 1.A developer implements a server action without authentication checks. What is a potential risk?

    • AIncreased code complexity
    • BUnauthorized access to the action
    • CImproved performance
    • DReduced server load
  2. 2.You notice a server action is slow after two rapid submissions. What is likely happening?

    • AThe actions are queuing sequentially
    • BThe client is caching responses
    • CThe server is overloaded
    • DThe actions are racing
  3. 3.A developer uses a hidden input to pass user ID to a server action. Why is this insecure?

    • AHidden inputs are not supported in forms
    • BHidden inputs can be forged
    • CHidden inputs slow down the server
    • DHidden inputs are not serialized
  4. 4.What must be done to ensure a server action is secure?

    • ADisable JavaScript on the client
    • BAuthenticate, authorize, and validate input
    • CUse server components for reads
    • DCache all server responses
  5. 5.A server action is defined but not working with JavaScript disabled. What might be wrong?

    • AThe form action is not correctly set
    • BThe client component is missing
    • CThe server is down
    • DThe server action is not async
  6. 6.Why should server actions not be used for reads?

    • AThey are POST-only and cannot be cached
    • BThey serialize data unnecessarily
    • CThey are faster than server components
    • DThey automatically revalidate paths
  7. 7.What happens if you check permissions in the component rendering the button, not in the server action?

    • AThe client component fails to load
    • BPermissions can be bypassed
    • CThe action becomes faster
    • DPermissions are enforced more strictly
  8. 8.What is a key requirement for arguments and return values in server actions?

    • AThey must be numbers
    • BThey must be serializable
    • CThey must be strings
    • DThey must be encrypted