3 ms·
I like this answer, however, its still not sufficient. Because you dont want to mix the "structure" of your UI with the behaviour of it. But in very dynamic app
by TeeWEE 11y ago
I like this answer, however, its still not sufficient. Because you dont want to mix the "structure" of your UI with the behaviour of it. But in very dynamic apps behaviour = structure. So in that case React makes sense.
However, i dove into web components with Polymer, and it seems that this is the "official" direction of components in the future web... It also doesnt try to mix HTML with JavaScript. In fact in the future there will be more langauges than javascript since there will be a bytecode for the browser. Having your app written in React poses a real problem when you want to switch your logic to a different programming language.
So isnt the Web Components solution much better?
It seems that React and Web Components can be combined:
https://github.com/Wildhoney/Maple.js https://github.com/Wildhoney/Maple.js
- detaro 11y ago"future" is the key word here I think. Yes, that's where it is going, but not yet.
- abritinthebay 11y ago> you dont want to mix the "structure" of your UI with the behaviour of it. And you don't have to with React. But you can do this kind of mess with any templating langauge - it's not a React issue, it's a bad programming issue. > Having your app written in React poses a real problem when you want to switch your logic to a different programming language. It really shouldn't. It's a View layer and the JSX part will be (practically) HTML still so it'll be really easy to port. The rest of the view logic would have to be ported no-matter what you use to decorate it. So this isn't really an objection.