5 ms·
> once code touches the DOM it's poison for reusability source? In reality, it's quite the opposite. You can't easily convert a React component to another fram
by JDDunn9 11y ago
> once code touches the DOM it's poison for reusability
source? In reality, it's quite the opposite. You can't easily convert a React component to another framework. The key to writing reusable code is to remove dependencies.
- HeyImAlex 11y agoReact is ultimately a framework for managing DOM mutations, so it would make sense that a pure logical model that doesn't touch the DOM also doesn't have a dependency on React.
- jhgg 11y agoNot true. React is a framework for managing state trees and mutations. As of 0.14, react has nothing to do with the dom at all. All that logic has been moved to react-dom.