Live data from Hacker News

Roadmap to becoming a React developer in 2018

github.com

131–140 of 153 posts

Re: Roadmap to becoming a React developer in 2018

#131
post #117

Surprised that redux-thunk is still alive in 2018, the cause of much of the most complicated and "ugly" code in Redux. Time to move to custom middleware(s)

Why do you say that thunks are "the cause of complicated and ugly code" ?

I'm a Redux maintainer, and I recommend thunks as the default choice for async logic. Most people just need to make some AJAX calls and dispatch an action when it returns, or maybe grab a value from the store state and work with it. Thunks are perfect for that kind of use case - complex synchronous logic, and simple async. In fact, with `async/await` syntax, I would be a bit more comfortable doing somewhat more complicated async logic in a thunk as well.

I wrote a post a while back discussing some common objections to using thunks (and sagas), and why I feel thunks and sagas are still good choices for handling logic in Redux apps: https://blog.isquaredsoftware.com/2017/01/idiomatic-redux-th...

That said, yes, you should always feel free to write custom middleware to solve your own use cases.

Re: Roadmap to becoming a React developer in 2018

#132

Earlier quoted context omitted.

> there’s a happy path The problem is that (if there really is such a happy path) it’s different for every person, dependent on that person’s previous experience, and impossible to determine until you know all the other stuff. You don’t know what you don’t know, and somebody who’s advising you ALSO doesn’t know what you don’t know. I’ve tried, over and over again, to “just do it” instead of taking things slowly and d…

I, too, need to understand how the things I’m using work before I am able to use them efficiently.

Whew, I thought I was just crazy.

Re: Roadmap to becoming a React developer in 2018

#133

I've noticed this spirit of "learn everything" all over the React and JavaScript community, and I don't think it's a good thing. Learning happens contextually as you figure things out. I see no use to learning half of the things on here that you'll never use. You do risk, however, in the confusing and complex JavaScript landscape, getting paralyzed by choice and never getting off the ground. I shutter thinking about…

This exact ideology hindered me when I first started learning to program. If I had decided to learn Just Enough To Get Crap Done I would've fared much better and joined the industry much sooner. Thankfully I found a good mentor who helped steer me away from all the terrible specifics and trying to learn the full stack and only learning what I needed

or advice on what to focus on then? when ur a beginner its tough to know how much is just enough to get done. and its not easy finding a mentor either!

Re: Roadmap to becoming a React developer in 2018

#134
post #63

I understand this is opinionated and "personal", but on the off chance that this might make React less intimidating, let me chime in and say that you can do professional work (and build pretty much any reasonable application) without: - really understanding "semantic HTML" (if you know what div's and span's are, you're ready to get to work), - understanding flexbox (you can, and many pro developers do, just use a CSS…

If you are building a small webapp where the difficulty is in WebSocket, updating a small user interface, etc... then maybe. But some sites require different things. You can't run a large eCommerce site with hundreds of sections/styles and not use CSS preprocessors or CSS architecture.

CSS could get more sophisticated than any React work. You can fix yourself with small patches but if you have thousands of pages this can't happen. It becomes suicidal and unfixable (you'll need to rework the whole CSS to SCSS and have a CSS architecture).

Re: Roadmap to becoming a React developer in 2018

#135
post #71
post #68

Earlier quoted context omitted.

That's really stretching the definition of "professional work". If you're just gluing third party components and libraries together you're going to end up with a bloated mess. This is why javascript/front-end developers get so much flak - there is a prevailing opinion that you can just fake it and not bother to learn best practices, not bother to test, and not bother to care about performance. If you do not consisten…

If you've invested the time to derive a first-principles understanding of why every element in a React environment works the way it does, and what the alternatives are, and why you're going to use any given alternative, I can understand being irritated with the idea that there's a happy path that people can traverse to get to your level of productivity with 1/50th the amount of effort. What I don't really get is the…

> It's a weird quirk of web development, not shared by any of the other kinds of front end development I've been exposed to in the ~22 years I've been shipping code, that "pro" UI has to be done from scratch.

Back in the 2004-2008 these frameworks were not well maintained and their coverage (the amount of elements/styles) they have was very small. They also were, uh, pretty ugly. I think that what made my opinion about them at the time.

But things have changed. Bootstrap now is well used, maintained and you can purchase professional styles for it.

Re: Roadmap to becoming a React developer in 2018

#136
post #67
post #49

Earlier quoted context omitted.

Absolutely. There are so few places where you actually need an SPA. And now with form_with doing remote forms by default and getting inline responses from the server it is a real stretch for someone to say they absolutely need some of these JS frameworks to get some simple non page load functionality.

There's something to this complaint, in that I actually rarely want an SPA either --- I usually want something that behaves like a damn web page. But having had several years of experience building web applications in Rails, handing data carefully between templates and controller code and managing the leaky abstractions for those places I actually had to use Javascript, I do not miss that experience at all . I'm not…

Similar datapoint here. I was never a Rails guy, my server-side comfort zone was always on the JVM, but React makes me so much more productive than I ever was before. I'm definitely not a frontend developer; I keep up with it because as a devops consultant I sometimes have to care, but my primary interests are server-side. When I have to slam out a web frontend to something, nothing I've ever used is faster than React, and nothing I've ever used feels as good when I'm actually using the application.

SEO? Sure, that's a problem...for web sites. I mostly make applications, though, and people who want it are the people who are looking for it.

Re: Roadmap to becoming a React developer in 2018

#137
post #134
post #63

I understand this is opinionated and "personal", but on the off chance that this might make React less intimidating, let me chime in and say that you can do professional work (and build pretty much any reasonable application) without: - really understanding "semantic HTML" (if you know what div's and span's are, you're ready to get to work), - understanding flexbox (you can, and many pro developers do, just use a CSS…

If you are building a small webapp where the difficulty is in WebSocket, updating a small user interface, etc... then maybe. But some sites require different things. You can't run a large eCommerce site with hundreds of sections/styles and not use CSS preprocessors or CSS architecture. CSS could get more sophisticated than any React work. You can fix yourself with small patches but if you have thousands of pages this…

Of course you can- many did that before CSS preprocessing was a thing.

Re: Roadmap to becoming a React developer in 2018

#138

Earlier quoted context omitted.

I, too, need to understand how the things I’m using work before I am able to use them efficiently.

Whew, I thought I was just crazy.

I’ve been where you are. Its not a good place. There are better workplaces.

Re: Roadmap to becoming a React developer in 2018

#139

Earlier quoted context omitted.

That's silly. GWT was a solid platform for quite a large number of years, and is still used in quite a large number of enterprises. Also, there are a lot of good ideas in there that the JS community is only just catching up to, like dead code elimination. A lot of modern javascript/typescript syntax is inspired by CoffeeScript. And CS is so trivially easy to learn that "saved a few brain cells" sounds like intellectu…

Honestly, have you ever stumbled upon a job offer requiring any of those while looking for a job? I'm not saying that job offers requiring e.g. coffeescript don't exist, I'm asking how much more likely you are to find a job that suits you because you know coffeescript?

I think job postings hide those requirements by not advertising them on purpose. They just kind of spring them on you in the first day and if you don't know it you will pick it up. Which is mildly ironic because they advertise all the technologies which you must have 5 years experience in or you won't be considered. I kinda don't buy it anymore.

Re: Roadmap to becoming a React developer in 2018

#140
post #63

I understand this is opinionated and "personal", but on the off chance that this might make React less intimidating, let me chime in and say that you can do professional work (and build pretty much any reasonable application) without: - really understanding "semantic HTML" (if you know what div's and span's are, you're ready to get to work), - understanding flexbox (you can, and many pro developers do, just use a CSS…

I have no idea what "professional work" could possibly mean in that sentence. The things that you have deemed superfluous are the tools of the trade. We don't use every tool on every job, but when we do use them, its because they make our work easier! Someone who doesn't know that lodash exists will reinvent lodash, and do it poorly because JS has crazy edge cases. Someone who hasn't experienced Bootstrap's crazy, ne…

> will reinvent lodash

Someone who knows modern JS inside and out will see lodash as yet another unnecessary dependency.

> Someone who doesn't know the purpose of Redux

Knowing the purpose of Redux has nothing to do with knowing or using Redux. Write a couple medium-size apps in React. Congratulations, you now know the problems that Redux aims to solve.

If your team doesn't have the discipline and experience to write a maintainable app without Redux, dropping Redux in isn't going to make it better and probably will make it worse.

The main problem with modern Web dev is that we think it's necessary to solve every problem by layering on ever more and more shiny crap on top, rather than focusing on a small set of inescapable tools and mastering them.

Want to be a React developer? Master HTTP, HTML, CSS, JS, and React. Then you'll know if you need lodash (nope) or a CSS framework (maybe) or Redux (probably not) and you'll be well equipped to make those decisions according to the project and team.

Of course, if this wisdom were commonly heeded, we wouldn't have this:

    $ create-react-app foo && find foo/node_modules -type f | wc -l
    20444
Which shows that in a modern "hello world" React app there are 20k files of dependencies installed out-of-the-box, with 900+ packages pulled from NPM. Good luck doing a security audit on that.

And we probably wouldn't have "awesome" lists of only the 2000 most important things you need to know to be a modern web dev, either.

Post reply on HN