The expr! macro defines an expression that can run on the server and in the browser. It compiles to Rust for the initial render and JavaScript for browser updates. Inside view!, write runtime expressions as $(...).
A procedure is an async server function called from a runtime expression. Use it when browser code needs server resources, such as a database. Each procedure has an HTTP endpoint. Validate its arguments and authorize access inside the procedure, since callers can send their own requests.
Use #[record] to work with your own structs in runtime expressions. An expression can create a record, access its fields by name, store it in a signal, or pass it to a procedure.
A shard is a component that re-renders on the server when its inputs change in the browser. Pass fixed values or runtime expressions as arguments. Changes to signals read by those expressions, or by the shard body, trigger a render. Each shard has an HTTP endpoint, so validate its inputs and authorize access inside the shard.