Hacker News new | ask | show | jobs
by drdiablo 4149 days ago
I think you forgot something that is very important to React: your component is a pure function that takes props and states and that outputs UI. Being able to make the assumption that given the same props and state, you'll get the exact same UI (to the cursor position), is extremely powerful. As a programmer your brain can focus on other things and forget about side nasty effects.
2 comments

In React your component is a class. The `render` function is a pure function, but the component itself is a state machine. This is why I prefer Mercury[1]

[1]https://github.com/Raynos/mercury

Also Cycle: https://github.com/staltz/cycle/

I don't prefer them over React, but I agree they make this stuff easier. React Hot Loader is a hack after all ;-)

True. No more spaghetti ball-of-mud. I'm waiting for IntelliJ to release `Extract custom render method` and `Extract React Component` refactors in their IDEs.
Hell yeah. That would compel me to switch to an IDE. In fact a React component-centric IDE would have been awesome.