Client update is not triggered every time
Bug details
I've created a test project to test Shade with Ktor: https://github.com/Aivean/shade-ktor-test
However, on the TodoList example I've encountered weird behavior: items are not always added. I checked the onClick callback, it is called correctly every time. Also websocket log indicates that new correct state is send to the client after each click. However, state is not rendered on the client every time:

Note: I've added a delay to the onClick callback , with it it's much easier to reproduce the issue, but it also sporadically happens without the delay.
Steps to reproduce
- checkout https://github.com/Aivean/shade-ktor-test
- run
./gradlew run - open http://localhost:8080/
- click
Addbutton repeatedly multiple times - observe view (not) updating
P.S. Thanks for creating this wonderful project.
Aaa! I didn't realize anyone was using this project and Github didn't notify me that this issue was opened, so I just now actually saw it. Ten months later, I think the issue may have to do with how the TODO list items are defined:
todoList.forEach { item ->
div {
key = item
+"TODO: "
+item
}
}
In your example, the key given to each item is its text; so all of the "a" will have the same key. This is a wrong way to use keys, but Shade's handling should be more graceful nonetheless.