Avoid prop drilling via 'this'
In Jeasx, every component can read and write this, a context object shared by all components of one request. It lets you pass data to deeply nested components without handing it down as props through every level. Each request gets its own context, so values never leak to other visitors.
Use it with care, as it hides dependencies between components, but it is handy for global settings like a theme. The route stores the theme in this.theme, and two levels below, <Card> reads it, although no component in between passes it on.
route → this.theme = "light" └─ <Page> → doesn't know the theme └─ <Card> → reads this.theme
I'm rendered with the light theme from
this.theme.