> why the menu is tied to the view at all, and not deriving its state from the user session
Yes! But it turns out in some of these frameworks “the user session” is not a magic global, your view has to pass it into the template.
And even if it was a global, you are super limited in how much derived data/queries you can compute off of it. Because you’re not using a full-powered language – instead it’s jinja, mustache, or similar.
Yes! But it turns out in some of these frameworks “the user session” is not a magic global, your view has to pass it into the template.
And even if it was a global, you are super limited in how much derived data/queries you can compute off of it. Because you’re not using a full-powered language – instead it’s jinja, mustache, or similar.