submillisecond-live-view
submillisecond-live-view copied to clipboard
Add support for anonymous events
Adds support for anonymous events, where the handler is inlined in the html.
html! {
button @click=(|state| state.count += 1) { "Increment" }
}
Upsides:
- Reduces boilerplate for simple events
Downsides:
- Rendered now has a generic
- VSCode intellisense doesn't seem to work in the callbacks
- Cannot manually trigger this event from the server
- Might be harder to debug, since the generated event name is random