Remove `Stipple.init(m::M, ...)` and document workflow (`isready` and other app events)
See original GitHub issueHi again 😃 I just noticed this strange behaviour when initializing a ReactiveModel. When I call the init()-Function before altering values in the Struct, the values are visible on the backend side but they are not transferred to the remote Endpoint and are thus stuck on the default values. But if I first create the Struct and set the values and afterwards call the init()-Function, the values are overwritten again and the default values are in place (I have found both ways in the demos).
Expected Behaviour
Initialize a model with Stipple.init() -> change values in the back end -> see changes in the front end
Code Example
using Genie, Stipple, StippleUI
@reactive mutable struct Test <: ReactiveModel
changed::R{Bool} = false
end
function changeModel(pModel)
pModel.changed[] = true
return pModel
end
function initFirst()
model = Stipple.init(Test())
return changeModel(model)
end
function initLast()
model = changeModel(Test())
return Stipple.init(model)
end
a = initFirst()
b = initLast()
println(a.changed[])
println(b.changed[])
function ui(model)
page(model, class = "container", [
p(
span("", @text(:changed))
)
]) |> html
end
route("/a") do
ui(a)
end
route("/b") do
ui(b)
end
up(8020, open_browser=true)
Am I missing something here or approaching this from the wrong angle?
Issue Analytics
- State:
- Created 2 years ago
- Comments:17 (7 by maintainers)
Top Results From Across the Web
Stipple LifeCycle - Guides - Genie Framework Documentation
life-cycle and the various events of a Stipple app · 1. Sync request – server side response · 2. Client side rendering ·...
Read more >Untitled
Captadores bartolini mk2, Appinit dlls registry key. Eastern coalfield limited recruitment 2012, First newspaper in america, Ipv6 localhost http, ...
Read more >Untitled
Lg circle case review, Au coeur de l'urgence pompier marseille, Moonglade kennels, Security cam app ipad. Theology of the cross paul?
Read more >Untitled
Kevin gates again sharebeast, Frauen werden gedeckt, Divalproex sodium 250 mg side effects, Sportive events 2013. Crankset 44t 170mm!
Read more >pyglet Documentation - Read the Docs
To let pyglet respond to application events such as the mouse and ... data for vertex buffer objects, texture data, polygon stipple data...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I can work on it - I’m struggling to make the session ModelStorage work, for some reason the session state gets pushed to all channels/clients.
Currently releasing/tagging new versions. Working super smoothly (sorry, compilation was a bit slow, my CPU was loaded 😄 )
Code: