Earlier quoted context omitted.
Just chiming in to say that I too hope class components will continue to be supported. I worry that they'll announce otherwise in a couple years. Class components are so stupidly simple to read and write. I appreciate the work put into function components, but to me they make things unnecessarily complex. Just the fact that they took callbacks and other functions from methods – where things are separate, clean, stand…
You can create isolated functions instead of nested functions wherever you want. Just pass in params instead of using closures. This is entirely up to the developer.
React v17.0 Release Candidate: No New Features
111–120 of 120 posts
Re: React v17.0 Release Candidate: No New Features
#112Earlier quoted context omitted.
React won the spa crowd. Lags behind in server side frameworks adoption over Vue. React won the enterprise crowd pushing angularjs out. React hasn't won over the JQuery crowd If you do primary js it probably has. If you only do some js and other things it probably hasn't yet.
So glad Angular is dying off. It looks nice on the surface but as soon as you try to do something outside the tutorial it gets nutty. React is at a great level of abstraction between code and UI framework. It reminds me of the MVC frameworks of olde, which by all accounts were great, just limited because they relied on page refresh for everything
React works really well but if I chose it for a personal project today it would only be to avoid switching back and forth, not because I think it is better.
Re: React v17.0 Release Candidate: No New Features
#113Earlier quoted context omitted.
>So glad Angular is dying off. Uh, I'm gonna challenge you to give a source on that. Your comment sounds extremely biased towards React and dismissive towards Angular. None of those are dying out, I wouldn't we even say they compete directly.
I've worked on Angular stuff for years because my employer won't let us switch. Angular uses too much abstraction. Angular does crazy things to the templates, to the point that trying to build your own UI widgets is a recipe for pain. Template meta-language is stupid. It's just similar enough to JS that you mess up the syntax all the time and never really stop. Since it's not just JS like JSX there's not good linting…
Sounds like are doing something wrong. At least I can't remember that particular one from three years of Angular >=2
> Repeated refactoring of HTML form interop and it still kinda sucks Major breaking changes on nearly every upgrade that take days to do, even on our small apps.
I did most of upgrades for over a year I think. They were mostly trivial after reading up on the changes and I don't consider myself a 10x engineer. Pro tip: Learn to use this repo: https://github.com/cexbrayat/angular-cli-diff
> Crappy documention. There's no usage examples for most of the library, just the Angular version of Javadoc.
Not perfect (internal inconsistentencies where one paragraph says "don't do this" and a couple of pages down they do exactly that).
But far far from Javafoc.
> Terrible bike shedding by Angular and Material teams. I'm following a bunch of issues and I've never seen one closed. I've been following some of the threads for years.
I don't like Material either ;-)
For everyone else:
Like always: keep it simple. Stick with the standards. Use a good ide/editor. Use Angular CLI, stick to the style suggested by that even though you don't have to use it for every small thing.
Re: React v17.0 Release Candidate: No New Features
#114Earlier quoted context omitted.
That conflicts with HTML syntax, no? is equivalent to .
Which is why the current JSX syntax uses that as a synonym for `disabled={true}`. Agreed that it matches HTML better, but having written an awful lot of `someLongVariableName={someLongVariableName}`, I sure wish I could stop repeating myself there.
What would happen with then?
What if there is a global disabled var?
Re: React v17.0 Release Candidate: No New Features
#115Earlier quoted context omitted.
> the biggest challenge in the JavaScript community was how fast everything moved If you don't like things moving too fast, then React does seem to be the ideal ecosystem: https://github.com/facebook/create-react-app/issues/9033#iss... TL;DR A vulnerability was discovered in a transitive dependency of "create-react-app" and announced back in March, but the one line patch to update the hard-coded reference to the vuln…
To be clear, the vulnerability has no actual effect on CRA apps. The description says it’s for a DDOS attack which is completely irrelevant because CRA doesn’t use WDS for production environments. (It doesn’t even have a production web server.) While I agree that ideally a release should be cut to satisfy people affected by enterprise requirements, we are looking at a case of an overzealous audit checker, not an actu…
I think that the real concern was not the non-existent security implications (although it's a bad habit to ignore even an overzealous audit checker), but that the release process for CRA seemed to make it very hard to cut new patch releases. Your comment suggests that it wasn't so hard after all, for which I am relieved and grateful, but the policy of expecting people to wait for (and deal with the backwards incompatibility of) major version updates[0] doesn't feel like an industry best practice.
[0] https://github.com/facebook/create-react-app/issues/9033#iss...
Re: React v17.0 Release Candidate: No New Features
#116Earlier quoted context omitted.
You can create isolated functions instead of nested functions wherever you want. Just pass in params instead of using closures. This is entirely up to the developer.
Not really lots of functions do have to be declared in useEffect for dependency management.
Re: React v17.0 Release Candidate: No New Features
#117Earlier quoted context omitted.
You can, yes. But the developer working on the codebase you’re going to inherit might not. Class components are usefully opinionated in that way.
Yep. And isolated functions are a solution, but sometimes it just makes way more sense for that function to be a method of a class. And for the function component to be a class component. I think there's space for both types of components, and I just hope that class components don't become deprecated.
Re: React v17.0 Release Candidate: No New Features
#118Earlier quoted context omitted.
To be clear, the vulnerability has no actual effect on CRA apps. The description says it’s for a DDOS attack which is completely irrelevant because CRA doesn’t use WDS for production environments. (It doesn’t even have a production web server.) While I agree that ideally a release should be cut to satisfy people affected by enterprise requirements, we are looking at a case of an overzealous audit checker, not an actu…
Thank you for your professionalism and humility. I too would like to apologise for not giving the full context and incorrectly suggesting that the vulnerability might actually affect apps created by CRA. I think that the real concern was not the non-existent security implications (although it's a bad habit to ignore even an overzealous audit checker), but that the release process for CRA seemed to make it very hard t…
Re: React v17.0 Release Candidate: No New Features
#119Earlier quoted context omitted.
https://2019.stateofjs.com/front-end-frameworks/#front_end_f... Versus 2016: http://2016.stateofjs.com/2016/frontend/ Angular is 100% fading, albeit slowly. Seems like a lot of slow moving enterprise companies are still going with it anecdotally. I'd bet on very few new projects opting for it currently, and probably near zero within 2-3 years. As to why, IMO Vue ate Angular's lunch. Single file components did everyth…
That is AngularJS.
You're right that MVC no longer applies, but Vue's components still beat Angular 2+ and the dev world seems to have spoken pretty loudly about feature preference/priority, and many of those mean Vue over Angular while leaving React a bit more in its own world.
Re: React v17.0 Release Candidate: No New Features
#120Earlier quoted context omitted.
This is fair, but I really enjoy using hooks. I personally feel my code is faster to write and easier to understand. It makes it much easier to have composable functions/state, which I love.
It's certainly faster to write once you get the hang of it but I don't think it's easier to understand. People seem to converge on multiple useEffect's with anonymous functions with non obvious scope for variables, empty arrays to designate behaviour that isn't obvious, lots of subtle async gotchas, stale state variables, etc. They certainly work when you memorise the rules and syntax, but it feels very contrived eve…
This drives me a little crazy too. That behaviour can be easily documented by wrapping it in a function with a name that makes sense, but people litter their React code with non-obvious hooks everywhere. You can reduce a lot of boilerplate (why are you writing empty arrays everywhere!?) and improve readability substantially by wrapping the hooks in more composed and idiomatic functions.
I think that was along the lines of what was intended for hooks, but I don't see it often.