enhance-dev / enhance-dev/enhance.dev

Include user interaction example

Open
#101 6 comments 0 reactions 0 assignees View on GitHub
docs enhancement
Dominant language
JavaScript
Stars
82
Forks
19
PR merge metrics
No merged PRs in 30d

Description

Love the clean back-to-basics syntax of Enhance! Great work!

One thing that I feel is missing from the docs is how to implement interactivity, since the developer ergonomics of binding syntax is one of the key differentiators in other frameworks.

It could be as complex as a full TodoMVC app or as simple as a "click a button to update some state" example. I wanted to recreate the 'CounterButton' example from this blog post: https://joshcollinsworth.com/blog/introducing-svelte-comparing-with-react-vue#authoring-svelte-components, but ended up having to use the `enhance('counter-button', { ... })` syntax, which felt like a step back into non-standard module land.

I understand that Enhance is meant to enhance vanilla JavaScript, and as such it may not offer any syntactic sugar for value binding, but even so, it would be helpful to include a best-practice example of how it should be done.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.