A user on Discord needed days to solve a problem.
The reason for this was that some routes were prerendered, which the helpers on Discord were not aware of.
See #11981
Describe the proposed solution
Print a warning when accessing locals during prerendering.
This could lead to some false positives, as some store a database connection to event.locals which gets used to fetch content while prerendering. However, I think this is a minority.
Describe the problem
A user on Discord needed days to solve a problem. The reason for this was that some routes were prerendered, which the helpers on Discord were not aware of. See #11981
Describe the proposed solution
Print a warning when accessing locals during prerendering. This could lead to some false positives, as some store a database connection to
event.locals
which gets used to fetch content while prerendering. However, I think this is a minority.Alternatives considered
Do nothing.
Importance
would make my life easier
Additional Information
No response