(app-watch watch-key app-ref old-value new-value)
(apply-attributes {:keys [onscreen-component app-ref old-view new-view]})
(build-ui app-ref view)
Take a view and realize it.
Take a view and realize it.
(children-applier? attr-applier)
(component-applier? attr-applier)
(component-did-mount? old-value new-value)
(create-comp app-ref comp)
(create-comp app-ref comp props)
Create a new top level component. There should not be many of these. This is akin to a main window. In the most extreme cases there may be a couple of hundred of these. In a typical case there will be between one component and a half a dozen components. The code is optimized for a small number of top level components. Legacy apps that wish to mount components in an existing non-Retroact component can use this to construct such "detached" components, which are essentially top level components as far as Retroact is concerned but not in the native windowing system. Note, the onscreen-component is built asynchronously and may be added to the legacy component in its component-did-mount or ... TODO: in the future there may be another way to do this.
Create a new top level component. There should not be many of these. This is akin to a main window. In the most extreme cases there may be a couple of hundred of these. In a typical case there will be between one component and a half a dozen components. The code is optimized for a small number of top level components. Legacy apps that wish to mount components in an existing non-Retroact component can use this to construct such "detached" components, which are essentially top level components as far as Retroact is concerned but not in the native windowing system. Note, the onscreen-component is built asynchronously and may be added to the legacy component in its component-did-mount or ... TODO: in the future there may be another way to do this.
(destroy-comp app-ref comp-id)
Destroy a component. You'll need to keep comp-id created with create-comp in order to call this.
Destroy a component. You'll need to keep comp-id created with create-comp in order to call this.
(init-app)
(init-app comp)
(init-app comp props)
Initialize app data as an atom and return the atom. The atom is wired in to necessary watches, core.async channels, and any other fns and structures to make it functional and not just a regular atom. The result is an atom that is reactive to changes according to FRP (Functional Reactive Programming). Components may subsequently be added to the app. For convenience there is a single arg version of this fn that will create a component. Although nothing prevents multiple calls to init-app and the code will work properly when multiple calls are made, init-app is intended to be called once. The resources (including threads) allocated are done so as if this is for the entire application.
Initialize app data as an atom and return the atom. The atom is wired in to necessary watches, core.async channels, and any other fns and structures to make it functional and not just a regular atom. The result is an atom that is reactive to changes according to FRP (Functional Reactive Programming). Components may subsequently be added to the app. For convenience there is a single arg version of this fn that will create a component. Although nothing prevents multiple calls to init-app and the code will work properly when multiple calls are made, init-app is intended to be called once. The resources (including threads) allocated are done so as if this is for the entire application.
(init-app-ref app-ref)
Initialize ref/atom/agent to work as state and "app" for Retroact components. If an application already has its own ref for handling state, this fn will allow the app to use that ref with Retroact instead of the default atom based empty state created by Retroact. There's no difference between using this and init-app. init-app is just a shortcut to use a default atom based ref.
Initialize ref/atom/agent to work as state and "app" for Retroact components. If an application already has its own ref for handling state, this fn will allow the app to use that ref with Retroact instead of the default atom based empty state created by Retroact. There's no difference between using this and init-app. init-app is just a shortcut to use a default atom based ref.
(instantiate-class ui)
(pad col length)
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close