IDEA
A themes is just a namespace that defines components as vars. All components for a given theme should be defined in a single namespace. (Whether they are required from an internal namespace is an implementation detail.) This makes it possible to go from an unqualified symbol like LoginPage and resolve it to a var representing a component.
A theme hierarchy is a sequence of themes (namespaces). Each theme in the sequence is checked, in order, to see whether it contains a var at a given symbol, such as LoginPage. The first theme found to have such a var is said to implement that component. For example, we can say that systems.bread.alpha.cms.theme.rise implements the LoginPage component because we can resolve the var #'rise/LoginPage.
This resolution is the job of the Theme Resolver.
(def resolver
(theme-resolver {:themes ['my.theme 'systems.bread.alpha.cms.theme.crust 'systems.bread.alpha.cms.theme.rise]}))
(component/resolve-component resolver 'MyPage)
;; => #'my.theme/MyPage
(component/resolve-component resolver 'LoginPage)
;; => #'systems.bread.alpha.cms.themes.rise/LoginPage
IDEA
A themes is just a namespace that defines components as vars. All components for a given theme should be defined in a single namespace. (Whether they are required from an internal namespace is an implementation detail.) This makes it possible to go from an unqualified symbol like
LoginPageand resolve it to a var representing a component.A theme hierarchy is a sequence of themes (namespaces). Each theme in the sequence is checked, in order, to see whether it contains a var at a given symbol, such as
LoginPage. The first theme found to have such a var is said to implement that component. For example, we can say thatsystems.bread.alpha.cms.theme.riseimplements theLoginPagecomponent because we can resolve the var#'rise/LoginPage.This resolution is the job of the Theme Resolver.