Is onUpdate correct?
See original GitHub issueWe’re calling onUpdate not inside the if (shouldUpdate(node, oldNode)) {
clause, but the one afterwards. Essentially, onUpdate will fire for every element when its props/attrs are updated, which is basically on every cycle. I am not sure if the current behavior makes sense.
Issue Analytics
- State:
- Created 7 years ago
- Comments:7 (6 by maintainers)
Top Results From Across the Web
Using OnUpdate correctly | WoWWiki - Fandom
This page is a guide on using OnUpdate correctly. The game engine will call your OnUpdate function once each frame. This is (in...
Read more >onUpdate in MySQL means? - Stack Overflow
1 Answer 1 ... Cascade on update just means if you update the PK on the parent table, it'll update the child field....
Read more >OnUpdate | InterSystems IRIS Data Platform 2022.2
OnUpdate - Specifies the action that this foreign key should cause in the current table when the key value of a record in...
Read more >Method OnUpdate | Entities | 0.17.0-preview.42 - Unity - Manual
The Update() function evaluates whether a system should, in fact, update before calling OnUpdate() . The Entities.ForEach and Job.WithCode ...
Read more >Difference between On Delete Cascade & On Update ...
ON UPDATE CASCADE ON DELETE CASCADE means that if you UPDATE OR DELETE the parent, the change is cascaded ... 3) is syntactically...
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 think onUpdate should only fire inside shouldUpdate check, but right now shouldUpdate is not advanced enough (no deep checking on attr/props) to reliably fire onUpdate. Which makes me think that some type of immutability with cheap referential checking would be helpful.
The confusing part may be how it’s called
shouldUpdate
when it’s more along the lines of something likeshouldRecreate
? Or perhaps I’m reading it incorrectly.https://github.com/hyperapp/hyperapp/commit/010172ca36596deef445ec2292478cd99c0c1a5b