Do's and don'ts
The mistakes that come up most often when writing utopia_hooks code, each as a short pair: the tempting wrong way, then the right way. Every snippet here is illustrative - the // DON'T halves intentionally do not compile or do not behave as written.
Naming conventions
Consistent names are what make the Screen / State / View split navigable. When every screen follows the same scheme, finding the State for a View - or the hook for a State - is mechanical. These are the rules the codebase holds to.
Modeling state
The State class is the contract between a hook and its View: every value the View renders and every action the user can trigger, in one place. How you shape that class decides how readable the View is, how the hook reads at its return statement, and how well automated refactors hold up. This page covers what goes in the class, how to represent it, and the trade-offs between the available forms.