barryels / realworld-mithril

Starter kit for new RealWorld framework implementations
https://realworld.io
37 stars 3 forks source link

Suggestion: use browser's event delegation system for forms #35

Open Bondifrench opened 7 years ago

Bondifrench commented 7 years ago

Hi,

I am a regular lurker into the Mithril gitter channel and saw you mentioning your project. Leo (Mithril's creator) has been quite an inspiration and helped me quite a bit on improving my understanding of javascript, the DOM etc... I thought I would point you to his previous blog where he distilled some nuggets of his wisdom, notably how to avoid lots of repetitions in forms when having multiple inputs.

This was written for the old Mithril so ctrl up to Mithril 0.2 should be replaced by vnode.state most of the time in Mithril 1.0.

His previous blog was really a great source of ideas, most of them have been incorporated into the new Mithril documentation but not the one above as far as I am aware.

Hope this helps,

Cheers