|
|
|
|
|
by HeyImAlex
3952 days ago
|
|
React encourages writing core logic in a DOM agnostic way. What you're saying is not only true of different frameworks; once code touches the DOM it's poison for reusability, and you can see it even inside of the react ecosystem. The key is to abstract out a pure logical model, and then build your actual DOM-touching instances ontop of that. |
|
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.