Live data from Hacker News

Why I moved from Angular to React

robinwieruch.de

21–30 of 107 posts

Re: Why I moved from Angular to React

#21

All these discussions miss the point to me: React can be run natively on Android and iOS. Can Angular? Vue? Elm? It seems like there can't be any real competition when starting a large class of new projects until the answer is "yes." So I'm asking: what are the best real alternatives that work natively on mobile?

Well, there's https://weex-project.io/ which claims to be easy the "React for Vue" you're asking about. The only caveat is that you'd better be reading Chinese version of documentation with Google Translate, English one is basically one huge "to be done" placeholder.

Yeah, I had actually looked through this documentation. It's state of readiness convinced me that it wasn't yet a viable solution.

Re: Why I moved from Angular to React

#22
post #19
post #16

Earlier quoted context omitted.

Till you try to build a web c omponent or embed an agular2 app in an existent DOM (haha)

How are you going to embed an app in another app/DOM without using an iframe, and how is creating that iframe going to be any harder to accomplish depending on the technologies used inside of it? I'm not sure what you mean about components...Angular is component based. Are you referring to native web components?

Take a rich component from your angular UI/lib and export it as a web element. (React/preact/vue/polymer) can!

Manage an stream of html comming from a backend CMS. An upgrade their DOM.

Re: Why I moved from Angular to React

#23

React has this intended/unintended side effect of teaching functional programming concepts without making it obvious. For me, after finding out the core concepts of React (views are pure functions, functional composition etc.) are actually functional programming applied tastefully to rendering, I finally realized the elegance of functional programming, and since than I've been merging these concepts into my programmi…

You should give Elm a look, then.

And after that, PureScript :)

Re: Why I moved from Angular to React

#24
post #20

My experience with Angular has been very different. I never felt pain working with Angular. Most of the issues I saw, boiled down to bad code. And I think those issues would still be there irrespective of framework used. I also don't get why two way binding is difficult to reason about. Can somebody please give me an example?

Because your state is spread everywhere... I used a lot angularjs before, and it's not bad, but I must admit that the jsx abstraction is so powerful.

Re: Why I moved from Angular to React

#25
post #7

Earlier quoted context omitted.

Check out NativeScript, you can use Angular 2 to build native mobile apps.

I'm still torn, most everyone I have talked too that did a non native app said they would never do it again and would rather do native.

NativeScript does make native apps. It's in the name.

Re: Why I moved from Angular to React

#27
React comes with its own syntax to build components called JSX. In JSX you can mix up HTML and JavaScript. Additionally people often use inline styles in their elements. It is like adding CSS into the mix.

This really scares me. We spent a lot of effort removing inline styling from HTML with CSS, and yet it still creeps into our HTML. We also have created a lot of "template" languages (e.g. PHP, Python, ERB, etc.) mixed in with HTML, which also tends to end badly (logic buried in HTML that is hard to find and hard to reason about).

How does React solve the "everything mixed into HTML" problem? Are we going down the same path that ended badly last time?

Re: Why I moved from Angular to React

#28

React has this intended/unintended side effect of teaching functional programming concepts without making it obvious. For me, after finding out the core concepts of React (views are pure functions, functional composition etc.) are actually functional programming applied tastefully to rendering, I finally realized the elegance of functional programming, and since than I've been merging these concepts into my programmi…

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.

Re: Why I moved from Angular to React

#29

Just a bug report: In the end of the article Mr. Rwieruch offers a free ebook to those that join his mailing list, unfortunately that does not happen. You are instead sent (after confirming your email) to a site that lists the 'minimum price' of the book as free, gives you a price slider that cannot go bellow 14.99 (and the "additional information icon" when hovered, shows a minimum price of 14.99, contradicting the…

Hi josinalvo, can you try the page again? As a student, the eBook should be pay what you want. You are the first person who reports the issue unfortunately. Sorry for the inconveniences.

No problem. Thanks for the prompt response.

I had tried as a student before. Just to make sure, I tried again. Slider wont come to less than 14.99.

See screenshot: http://5cm.ru/view/i7/AwQ7.png

Note that it says free on the page, and minimum=14.99 on the dialog.

Also note that student is selected

Re: Why I moved from Angular to React

#30
post #27

React comes with its own syntax to build components called JSX. In JSX you can mix up HTML and JavaScript. Additionally people often use inline styles in their elements. It is like adding CSS into the mix. This really scares me. We spent a lot of effort removing inline styling from HTML with CSS, and yet it still creeps into our HTML. We also have created a lot of "template" languages (e.g. PHP, Python, ERB, etc.) mi…

It switches the axis of concern from separating out the different classes of code (HTML, JS, CSS) to separating out the functional goals of your code (Component A does this specific thing, Component B does that specific thing). Realistically, the triad of front end technologies are tightly coupled, regardless of whether they're in the same file. If you can keep your components nicely bounded, then it's far easier to have them be self-contained.
Post reply on HN