Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

>> events: {

>> 'input input': 'updatePassword'

>> },

So this is no mystery?.

There is an 'events' object which has 'input input' string mapped to 'updatePassword' string. Why there is "input" written twice? Why do you have to reference functions by their name inside of a string? What if you have 100 event handlers and you make a typo in one of them? How will compiler understand there is a bug if you don't reference an actual function?

This whole "let's map string to string in this obect to make HTML element in one place fire an actual function in the third place" way of doing things must be a hell to maintain, bug-prone and frustrating. Why on earth you shouldn't do it with Element.addEventListener('input'), Element.on('input') or at least Element.oninput = ...?

What is this.$el, this.$('').html anyway?

$(() => {}) - wow this is VERY verbosely telling DOM is ready

I don't know, React really does look like a huge progress when directly compared to this hacky-looking backbone framework.

UI = fn(state), and it's beautiful. Yes, you need to understand side-effects and memoization, these are standard functional patterns, clearly described in the documentation. You need to understand the "stable identity" for the elements, because when recursing on the children of a DOM node, React just iterates over both lists of children at the same time and generates a mutation whenever there's a difference. There is an in-depth explanation for that in the documentation. There is nothing obscure or hard in React if you read the documentation once.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: