Mob 0.7.12 has been released.
Fixed
~MOBnow raises a clear error when@foois used withoutassignsin
scope. The@foo→assigns.fooshorthand (0.7.11) only works inside a
render(assigns); used in an ordinary helper function (positional args — the
idiomatic composite pattern) it compiled to a cryptic “undefined variable
assigns”. The sigil now guards withMacro.Env.has_var?(caller, {:assigns, nil})(the same check Phoenix’s~Huses) and raises aCompileErrornaming
the fix ({title}instead of@title). Only@-using templates trigger it —
a static~MOB(<Text text="hi"/>)in a positional-arg helper still compiles.
(MOB-5, #56)
Documentation
- Worked component-authoring examples in the Components guide. The
“Defining your own components” section now carries two complete, runnable
screens — a function composite and a tag composite — spelling out the
tag→atom rule and whereon_*event-target auto-injection applies (a
composite tag’s own props vs a plain widget in its children). The@assigns
section documents that@fooonly works whereassignsis in scope and
steers helpers to positional{var}. (#56, #57)






















