From 7b72745661979fc4e896c1e124b3ad385f452538 Mon Sep 17 00:00:00 2001 From: hhaensel Date: Tue, 17 Oct 2023 09:52:43 +0200 Subject: [PATCH] fix documenter issues, part I --- docs/src/API/elements.md | 2 +- docs/src/API/namedtuples.md | 2 +- src/stipple/reactivity.jl | 14 ++++++++++++++ 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/docs/src/API/elements.md b/docs/src/API/elements.md index 62e0ec05..9d50b154 100644 --- a/docs/src/API/elements.md +++ b/docs/src/API/elements.md @@ -8,7 +8,7 @@ elem vm vue_integration @iif -@elsiff +@elsiif @els @recur @text diff --git a/docs/src/API/namedtuples.md b/docs/src/API/namedtuples.md index 309a5adc..586631d6 100644 --- a/docs/src/API/namedtuples.md +++ b/docs/src/API/namedtuples.md @@ -1,5 +1,5 @@ ```@meta -CurrentModule = NamedTuples +CurrentModule = Stipple.NamedTuples ``` ```@docs diff --git a/src/stipple/reactivity.jl b/src/stipple/reactivity.jl index af5dbd5f..0ee2846c 100644 --- a/src/stipple/reactivity.jl +++ b/src/stipple/reactivity.jl @@ -1,3 +1,17 @@ +""" + mutable struct Reactive{T} <: Observables.AbstractObservable{T} + +`Reactive` is a the base type for variables that are handled by a model. It is an `AbstractObservable` of which the content is +obtained by appending `[]` after the `Reactive` variable's name. +For convenience, `Reactive` can be abbreviated by `R`. + +There are several methods of creating a Reactive variable: +- `r = Reactive(8)` +- `r = Reactive{Float64}(8)` +- `r = Reactive{Float64}(8, READONLY)` +- `r = Reactive{String}("Hello", PRIVATE)` +- `r = Reactive(jsfunction"console.log('Hi')", JSFUNCTION)` +""" mutable struct Reactive{T} <: Observables.AbstractObservable{T} o::Observables.Observable{T} r_mode::Int