8 ms·
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 m
by drdiablo 12y 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.
- jasim 12y agoTrue. 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.
- danabramov 12y agoHell yeah. That would compel me to switch to an IDE. In fact a React component-centric IDE would have been awesome.
- Touche 12y agoIn 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 https://github.com/Raynos/mercury
- danabramov 12y agoAlso Cycle: https://github.com/staltz/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 ;-)