(active-screen)
Returns the active screen as a map, with :screen storing the current screen and :params storing the URL parameters for the current screen.
Returns the active screen as a map, with :screen storing the current screen and :params storing the URL parameters for the current screen.
(application {:keys [default-screen reconciler root root-js? target
screen-mounted]
:or {root-js? false}})
Creates an Om Next application that implements screen-based routing. Takes an Om Next reconciler, a default screen, a target DOM element, a root component and a flag as to whether or not the root component is a JS component.
The root component is expected to accept the properties
defined for screens, so :sections
and arbitrary other forms.
:sections
is a map of section keys to instantiated components.
The root component can then decide which of these components
to render where based on these section keys.
During rendering, the provided root component is wrapped
in an application component that handles the screen routing
logic and generates the :sections
and other form props
based on the active screen.
Creates an Om Next application that implements screen-based routing. Takes an Om Next reconciler, a default screen, a target DOM element, a root component and a flag as to whether or not the root component is a JS component. The root component is expected to accept the properties defined for screens, so `:sections` and arbitrary other forms. `:sections` is a map of section keys to instantiated components. The root component can then decide which of these components to render where based on these section keys. During rendering, the provided root component is wrapped in an application component that handles the screen routing logic and generates the `:sections` and other form props based on the active screen.
(camel-cased-prop-map m)
Convert a Clojure map with Om Next properties to a map where all keys are camel-cased strings that can be accessed like object properties in JS/React.
Convert a Clojure map with Om Next properties to a map where all keys are camel-cased strings that can be accessed like object properties in JS/React.
(mount this)
(goto this screen params)
(reload this)
(mount-screen app screen params)
Mounts a screen with parameters by setting it as the active screen and updating the root wrapper's component query according to the screen's sections.
Mounts a screen with parameters by setting it as the active screen and updating the root wrapper's component query according to the screen's sections.
(parser {:keys [read mutate]})
Returns a parser that wraps the provided read function to catch queries for screen-based routing information.
Returns a parser that wraps the provided read function to catch queries for screen-based routing information.
(read-forms _ {:keys [screen]} _ _)
Queries the forms of the active screen.
Queries the forms of the active screen.
(read-screen read {:keys [parser query] :as env} _ _)
Executes a query agains the active screen.
Executes a query agains the active screen.
(read-sections _ {:keys [parser query screen] :as env} _ _)
Executes all queries for views in the sections of the active screen.
Executes all queries for views in the sections of the active screen.
(reload-active-screen!)
Reloads the implementation of the active screen by replacing it with a freshly resolved instance from the screen registry.
Reloads the implementation of the active screen by replacing it with a freshly resolved instance from the screen registry.
(root-component)
Returns the root component to be used.
Returns the root component to be used.
(set-active-screen! screen params)
Sets the active screen and its parameters.
Sets the active screen and its parameters.
(set-root-component! factory js?)
Configures the root component to be used.
Configures the root component to be used.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close