Live data from Hacker News

Why I moved from Angular to React

robinwieruch.de

101–107 of 107 posts

Re: Why I moved from Angular to React

#101

Surprised that a blog post is published this year that is about moving from AngularJS (v1) to React. That's not really that big of a shock, lots of devs are doing that. A better comparison is Angular (v2+) vs. React, and it is really a good fight that boils down to whether you want a framework, or you want the freedom to build your own from specific parts.

Which one do you suggest would just be the parts?

React is built out of components

Re: Why I moved from Angular to React

#102

Earlier quoted context omitted.

MobX makes React simple because it's JavaScript. If you've write React with ClojureScript, you will find out that ClojureScript simplified React too. And people may also say ClojureScript is the magic piece that make React great.

How would ClojureScript help here?

I'm saying MobX is not the final answer for React. Behind React is the theory of uni-directional data flow. Observable in MobX looks nice and it fixes uni-directional data flow in JavaScript syntax of assignments. Seeing from ClojureScript and other languages that implemented persistent data structure by default, MobX is just a tricky solution designed for JavaScript. And ClojureScript handle uni-directional data flow well too with persistent data and atom type.

Re: Why I moved from Angular to React

#103

Earlier quoted context omitted.

How would ClojureScript help here?

I'm saying MobX is not the final answer for React. Behind React is the theory of uni-directional data flow. Observable in MobX looks nice and it fixes uni-directional data flow in JavaScript syntax of assignments. Seeing from ClojureScript and other languages that implemented persistent data structure by default, MobX is just a tricky solution designed for JavaScript. And ClojureScript handle uni-directional data flo…

Ah I see. I wasn't saying it is the final answer. It's just a 'good thing' because without it I wouldn't have learned observables to the depth that I did.

It's a start... because it brings the concept to Javascript, a language that I'm already familiar with and have a build chain for.

If one is going to switch languages, then you can consider the whole sweep of compile-to-JS languages. Elm is pretty nice in that scenario, and pairs well with my use of Elixir on the backend.

Re: Why I moved from Angular to React

#104
post #64

How many of you developers who use React and say that JSX is the second coming of Jesus, are also able to produce a semantically coherent HTML document with JSX? It seems to me that React + JSX are perfect for "divitists" and devs who use a h3 because its font-size has the desired value. I'm not being sarcastic, I genuinely can't understand why a good web developer who cares about the meaning of a HTML document shoul…

I must be completely missing your point. React supports the vast majority of html elements. There's nothing I can think of about React that would encourage someone to misuse html, you're using the exact same tags you'd be using to create a vanilla site. The only difference is that you're declaratively defining how they change based on state. A good html developer will still use best practices when using React, a bad…

I don't know, I have yet to stumble upon a React developer who doesn't just use divs and spans for everything and who doesn't choose headings because of their font size.

That's why this question began to slowly form in my mind.

[edit: phrasing and grammar]

Re: Why I moved from Angular to React

#105

Earlier quoted context omitted.

I'm saying MobX is not the final answer for React. Behind React is the theory of uni-directional data flow. Observable in MobX looks nice and it fixes uni-directional data flow in JavaScript syntax of assignments. Seeing from ClojureScript and other languages that implemented persistent data structure by default, MobX is just a tricky solution designed for JavaScript. And ClojureScript handle uni-directional data flo…

Ah I see. I wasn't saying it is the final answer. It's just a 'good thing' because without it I wouldn't have learned observables to the depth that I did. It's a start... because it brings the concept to Javascript, a language that I'm already familiar with and have a build chain for. If one is going to switch languages, then you can consider the whole sweep of compile-to-JS languages. Elm is pretty nice in that scen…

Yeah, agreed.

Re: Why I moved from Angular to React

#106

I've used ExtJS, Backbone, CanJS, Angular, Polymer and React commercially. To me, React is a more complex alternative to Google's Polymer framework. In React, a component is made up of code which has HTML inside it. In Polymer, a component is made up of HTML which has code inside it. They're actually the inverse of each other but the result is almost exactly the same - Both libraries allow you to build components whi…

My team is moving from React to Vue precisely for many of the reasons you are pointing out. We considered Polymer but we felt it's still too early for web components. Vue's code is not as elegant as React or others, but it's very pragmatic, fast, lightweight, and easy to learn.

Re: Why I moved from Angular to React

#107

Earlier quoted context omitted.

You should give Elm a look, then.

I'm really interested in Elm, it's on my 'things to explore' list. But I've already built a big 'component' library for my designs and style in React, and it's hard to justify a switch to anything else for a long time. And sadly that's the biggest problem the upcoming languages/frameworks face.

Nothing wrong with that. I'm on a greenfield project with no particular deadline, so I chose Rust + Elm, but if I had to build rapidly, or had already committed a bunch of code in another framework, I'd definitely stick with that.
Post reply on HN