Liking cljdoc? Tell your friends :D

membrane.component


*root*clj/s

source

calculate-pathclj/s

(calculate-path deps k)
source

component-cacheclj/s

source

db-effectsclj/s

(db-effects atm)

Effects for updating state in an atom.

The effects are:

:update similar to update except instead of a keypath, takes a more generic path. example: [:update $path inc] :set sets the value given a $path example: [:set $path value] :delete deletes value at $path example: [:delete $path]

Effects for updating state in an atom.

The effects are:

`:update` similar to `update` except instead of a keypath, takes a more generic path.
example: `[:update $path inc]`
`:set` sets the value given a $path
example: `[:set $path value]`
`:delete` deletes value at $path
example: `[:delete $path]`
sourceraw docstring

defeffectclj/smacro

(defeffect type args & body)

Define an effect.

defeffect is a macro that does 3 things:

  1. It registers a global effect handler of type. type should be a keyword and since it is registered globally, should be namespaced
  2. It will define a var in the current namespace of effect-*type* where type is the name of the type keyword. This can be useful if you want to be able to use your effect functions in isolation
  3. It will implicitly add an additional argument as the first parameter named dispatch

The arglist for dispatch! is [type & args]. Calling dispatch! will invoke the effect of type with args. The role of dispatch! is to allow effects to define themselves in terms of other effects. Effects should not be called directly because while the default for an application is to use all the globally defined effects, this can be overridden for testing, development, or otherwise.

example:

(defeffect ::increment-number [$num] (dispatch! :update $num inc))

Define an effect.

  `defeffect` is a macro that does 3 things:
1) It registers a global effect handler of `type`. `type` should be a keyword and since it is registered globally, should be namespaced
2) It will define a var in the current namespace of `effect-*type*` where *type* is the name of the type keyword. This can be useful if you want to be able to use your effect functions in isolation
3) It will implicitly add an additional argument as the first parameter named `dispatch`

The arglist for `dispatch!` is `[type & args]`. Calling `dispatch!` will invoke the effect of `type` with `args`.
The role of `dispatch!` is to allow effects to define themselves in terms of other effects. Effects should not be called directly because while the default for an application is to use all the globally defined effects, this can be overridden for testing, development, or otherwise.


  example:

  (defeffect ::increment-number [$num]
      (dispatch! :update $num inc))

  
sourceraw docstring

defuiclj/smacro

(defui ui-name & fdecl)

Define a component.

The arguments for a component must take the form (defui my-component [ & {:keys [arg1 arg2 ...]}])

Define a component.

The arguments for a component must take the form (defui my-component [ & {:keys [arg1 arg2 ...]}])

sourceraw docstring

doall*clj

(doall* s)
source

effect-clipboard-copyclj

source

effect-clipboard-cutclj

source

effectsclj/s

source

fully-qualifiedclj

(fully-qualified sym)
source

make-top-level-uiclj/s

(make-top-level-ui ui-var state-atom handler)
source

path->specclj/s

(path->spec elem)
source

path-replace-macroclj/smacro

(path-replace-macro form)
(path-replace-macro deps form)
source

run-uiclj/s

(run-ui ui-var)
(run-ui ui-var initial-state)
(run-ui ui-var initial-state handler)
(run-ui ui-var initial-state handler options)

ui-var The var for a component initial-state The initial state of the component to run or an atom that contains the initial state. handler The effect handler for your UI. The handler will be called with all effects returned by the event handlers of your ui.

If handler is nil or an arity that doesn't specify handler is used, then a default handler using all of the globally defined effects from defeffect will be used. In addition to the globally defined effects the handler will provide 3 additional effects:

:update similar to update except instead of a keypath, takes a more generic path. example: [:update $path inc]

:set sets the value given a $path example: [:set $path value]

:delete deletes value at $path example: [:delete $path]

return value: the state atom used by the ui.

The only difference between run-ui and run-ui-sync is that run-ui-sync will wait until the window is closed before returning.

options options is a map of options that get passed to the underlying graphics platform. see membrane.skia/run or membrane.webgl/run for more info.

`ui-var` The var for a component
`initial-state` The initial state of the component to run or an atom that contains the initial state.
`handler` The effect handler for your UI. The `handler` will be called with all effects returned by the event handlers of your ui.

If `handler` is nil or an arity that doesn't specify `handler` is used, then a default handler using all of the globally defined effects from `defeffect` will be used. In addition to the globally defined effects the handler will provide 3 additional effects:

`:update` similar to `update` except instead of a keypath, takes a more generic path.
example: `[:update $path inc]`

`:set` sets the value given a $path
example: `[:set $path value]`

`:delete` deletes value at $path
example: `[:delete $path]`

return value: the state atom used by the ui.

The only difference between `run-ui` and `run-ui-sync` is that `run-ui-sync` will wait until the window is closed before returning.

`options` options is a map of options that get passed to the underlying graphics platform. see `membrane.skia/run` or `membrane.webgl/run` for more info.
sourceraw docstring

run-ui-syncclj

(run-ui-sync ui-var)
(run-ui-sync ui-var initial-state)
(run-ui-sync ui-var initial-state handler)
(run-ui-sync ui-var initial-state handler options)

ui-var The var for a component initial-state The initial state of the component to run or an atom that contains the initial state. handler The effect handler for your UI. The handler will be called with all effects returned by the event handlers of your ui.

If handler is nil or an arity that doesn't specify handler is used, then a default handler using all of the globally defined effects from defeffect will be used. In addition to the globally defined effects the handler will provide 3 additional effects:

:update similar to update except instead of a keypath, takes a more generic path. example: [:update $path inc]

:set sets the value given a $path example: [:set $path value]

:delete deletes value at $path example: [:delete $path]

return value: the state atom used by the ui.

The only difference between run-ui and run-ui-sync is that run-ui-sync will wait until the window is closed before returning.

options options is a map of options that get passed to the underlying graphics platform. see membrane.skia/run or membrane.webgl/run for more info.

`ui-var` The var for a component
`initial-state` The initial state of the component to run or an atom that contains the initial state.
`handler` The effect handler for your UI. The `handler` will be called with all effects returned by the event handlers of your ui.

If `handler` is nil or an arity that doesn't specify `handler` is used, then a default handler using all of the globally defined effects from `defeffect` will be used. In addition to the globally defined effects the handler will provide 3 additional effects:

`:update` similar to `update` except instead of a keypath, takes a more generic path.
example: `[:update $path inc]`

`:set` sets the value given a $path
example: `[:set $path value]`

`:delete` deletes value at $path
example: `[:delete $path]`

return value: the state atom used by the ui.

The only difference between `run-ui` and `run-ui-sync` is that `run-ui-sync` will wait until the window is closed before returning.

`options` options is a map of options that get passed to the underlying graphics platform. see `membrane.skia/run` or `membrane.webgl/run` for more info.
sourceraw docstring

special-fnsclj

source

special-symsclj/s

source

Top-level-uiclj/s

source

top-level-uiclj/s≠

clj
(top-level-ui & {:keys [extra state body arg-names defaults handler context]})
cljs
(top-level-ui &
              {:keys [extra state body arg-names defaults handler context]
               :as m-38026})
source

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close