Live data from Hacker News

My struggle to learn React

bradfrost.com

81–90 of 218 posts

Re: My struggle to learn React

#81
Have a look at Elm, Cycle.js, ReasonML with BuckleScript-TEA, GHCJS/Miso or PureScript/Halogen.

I tend to believe the problem with React is not React it is JS. Therefor most FWs mentioned above are not in JS (except for Cycle.js, but that uses JS functionally).

Re: My struggle to learn React

#82
post #54

Honestly I don't know how I learned React. It's not fun at all. Oh sure, the basics of React is not too hard. If you ignore all the outdated examples and code (using var, no JSX, overusing component lifecycle, not using functional components). But then learning Redux, React Router, React JSS, Reselect, Redux Thunk, Webpack, etc., is just terrible. Sure, there are tutorials for each individual library, or maybe even t…

I found react to be extremely intuitive and easy to learn. Redux and react-redux are horribly non-intuitive. So much boilerplate and meaningless terminology and stringly-typed objects. I avoid it.

Switching from Redux to Mobx dramatically decreased my mental load. It is much more straight forward.

Re: My struggle to learn React

#83
post #12

This is a fine article. But I just want to say, as an alternate data point, my experience has been exactly the opposite . I love React. React is the first front-end technology I have ever managed to get to stick. * ES6 is just a detail, I know. But for me, ES6 transforms Javascript from an idiosyncratic scripting language where I constantly have to look up the ordinary way to handle basic programming tasks into somet…

>>* The tooling was a disaster before create-react-app. But now there's create-react-app, so the tooling isn't a problem. But what happens when you inevitably need to step outside the boundaries set by create-react-app? From that perspective, it simply delays the problem, rather than solving it.

You can eject the app to exit CRA's umbrella. All of your configuration and code still works, you just also gain access to the project config and Webpack config that CRA formally dealt with for you.

A lot of the time, simply using react-app-rewired is sufficient in place of ejecting, especially if the only thing you need are some Webpack plugins.

Re: My struggle to learn React

#84
post #35

Earlier quoted context omitted.

>>* The tooling was a disaster before create-react-app. But now there's create-react-app, so the tooling isn't a problem. But what happens when you inevitably need to step outside the boundaries set by create-react-app? From that perspective, it simply delays the problem, rather than solving it.

I don't know, because haven't needed to step outside those boundaries. I'm sure it will be painful when that happens, but by that point, I'll have gotten so much done that I probably won't care too much. I had a gulp build process I used before create-react-app; it was gross to get working, but then worked just fine. I could live without create-react-app, but why would I?

If you hit the point where you're considering ejecting, check out react-app-rewired. If you just need additional Webpack plugins, react-app-rewired can do that for you without the need to completely eject your app.

Re: My struggle to learn React

#85
I can definitely sympathize with the issues that come from not being familiar with ES6. I'm working through a React Native tutorial currently and, while I've managed to understand some of it via context, there's some very odd looking syntax that I still don't understand.

Can't really comment on the rest of the React ecosystem until I get through the tutorial and start trying to do things on my own.

Re: My struggle to learn React

#86
post #12

This is a fine article. But I just want to say, as an alternate data point, my experience has been exactly the opposite . I love React. React is the first front-end technology I have ever managed to get to stick. * ES6 is just a detail, I know. But for me, ES6 transforms Javascript from an idiosyncratic scripting language where I constantly have to look up the ordinary way to handle basic programming tasks into somet…

>>* The tooling was a disaster before create-react-app. But now there's create-react-app, so the tooling isn't a problem. But what happens when you inevitably need to step outside the boundaries set by create-react-app? From that perspective, it simply delays the problem, rather than solving it.

I guess it depends on how you learn. I personally used CRA in my learning process and it helped me get up to speed in understanding React fundamentals (reconciliation, lifecycles, state management..) Then I started going down into the stack and understanding Webpack, etc..

For me personally it would be exasperating to learn all of the stuff that CRA bootstraps before actually getting to learn React.

Re: My struggle to learn React

#87
post #32

Earlier quoted context omitted.

In the pursuit of React, something is added everyday. In the pursuit of enlightenment, something need to be dropped everyday. [1] In the react realm, every problem is solved by throwing another layer of complexity/abstraction/whatever you call it [1] Adapted from https://www.goodreads.com/quotes/175803-in-the-pursuit-of-kn...

Like Java/Spring. Why do not use a more simple approach, say jQuery?

Why use jQuery when the native document.querySelector/querySelectorAll methods are available everywhere these days?

Re: My struggle to learn React

#88

At this point, the JS ecosystem with React is a bit too complicated for a hobbyist to learn quickly. I have friends spending months with just React, not including other libraries. But React is a tool for building complicated UI's, and overwhelmingly complicated UI's are requirements for startups, corporations and organizations, not personal sites or small toys. So like many other technologies, this one is perhaps bes…

Agreed. I am very familiar with most front-end stacks. I typically choose React for my projects, and I really love it. But when a beginner asks me "What is the best framework for me, having little knowledge of front-end dev/ecosystem?", I almost always just recommend Vue.js. I personally don't mind the setup of React, even for small projects, but I wouldn't wish that upon someone jumping into front-end dev for the first time.

Re: My struggle to learn React

#89
> 4. Getting lost in this-land.

This is one of major design flaws in JavaScript; when one goes deeper into prototype land and using 'this' in closures/functions, facepalming happens all the time as the semantics is completely different to what one would expect in better designed languages like C++ and Java. So you have to workaround around these warts, making the programming akin to walking on eggshells. Especially if JavaScript is only one of languages you know well, and you have to switch back and forth between many different languages that are more-less compatible with each other in this regard.

Re: My struggle to learn React

#90

I don't get what the benefit of using React is, aside from having it on my resume. A virtual DOM? What does that get me? It renders faster? Rendering speed is not a problem my CRUD screens have. Etc., etc. Perhaps some UIs are so complex and dynamic that they're easier to build and maintain using React. I'm not saying other people shouldn't use React, but I'm fairly certain it wouldn't give me enough payback to justi…

But you can display likes and notifications realtime on top of your screen with no effort! Can't you see the immediate benefit? /s
Post reply on HN