Earlier quoted context omitted.
"I don't remember React being the very clear choice until probably 2017." Maybe you werent paying attention then.
CSS Modules didn't become the default way to go until sometime in 2016. Before that point people were still stumbling over how to manage their CSS in a component-oriented fashion, and it was only once that happened did React "win".
Do Not Follow JavaScript Trends
221–230 of 275 posts
Re: Do Not Follow JavaScript Trends
#222I vividly remember 2016. I was doing backend programming at the time, but no one I knew were using Angular.js at that time for new codebases. React emerged in 2013, by 2014 the hype was at full swing, and by 2015 React "won" the framework battle. It's been 5+ years since then, and React JavaScript world was remarkably stable. Fashion changes were largely superficial: React.createClass vs ES classes, Heavy use of Deco…
What do you mean, everyone is now updating their codebases to remove redux, HoF and switch to hooks.
Re: Do Not Follow JavaScript Trends
#223On the react bandwagon for almost 5 years now and haven’t regretted it a single day. Started using it because it allowed me to build d3-type data visualisations but with way more flexibility in terms of hierarchy and grouping of DOM elements in what for me felt like a very intuitive format of components and JSX. So I would say thrust your own judgement when considering which tools! Not all trends are pure hype, there…
I really like react, and I'm glad to see other environments adopting a React-like approach to UI development (Apple's SwiftUI and Android's Jetpack Compose, to name two)
Re: Do Not Follow JavaScript Trends
#224Earlier quoted context omitted.
Not true. litElement (used by Polymer) uses tagged template literals and no vdom.
You're right, LitElement and Polymer don't use a VDOM. [0][1] I don't think Polymer 3 uses LitElement though. Seems to say they're highly compatible, but that Polymer 3 uses PolymerElement, not LitElement. [2] [0] https://lit-html.polymer-project.org/ [1] https://www.infoq.com/news/2019/06/polymer-lit-html-element-... [2] https://github.com/Polymer/polymer
They're highly compatible because they are both web components-based. There's no "framework" that creates component instances, the browser does that when it sees the custom elements. So each component is in control of its own lifecycle and rendering. You can have a Polymer element use LitElements (or Stencil, or Lightening, etc) or vice-versa.
Re: Do Not Follow JavaScript Trends
#225Earlier quoted context omitted.
As an outsider, I feel like React both does too much (a virtual DOM? Aren't current web standards enough to make a flower shop website?) and too little -- there's all these terms/technologies/subframeworks that people are using like "create-react-app" and "Redux" and so on. It's neither an overarching architecture that makes normal web technology obsolete but runs on it, like Windows 95, nor a website generator like…
> a virtual DOM? Aren't current web standards enough to make a flower shop website? Of today's frameworks, all but Svelte use a virtual DOM.
VDOM diffing is pretty slow, memory intensive, and unnecessary. It's very good it's not the only game in town.
Re: Do Not Follow JavaScript Trends
#226Earlier quoted context omitted.
Typescript is leagues ahead of Python. Types and async/await are the big ones, but destructuring, no lambda weirdness, optional chaining, nullish coalescing, proxies, JSON support, and generally debugging tools are all better.
I'm not well-versed in TypeScript, and I have plenty of frustrations in Python so it's not that I don't believe you, but I do have a few questions: * Python has async/await. It's not as pleasant as goroutines, but it exists and is presumably about as pleasant as async/await in TS, at least assuming you're using or not using the type system in both cases. * Python has tuple/list/iterable destructuring. What is the spe…
Re: Do Not Follow JavaScript Trends
#227Earlier quoted context omitted.
CSS Modules didn't become the default way to go until sometime in 2016. Before that point people were still stumbling over how to manage their CSS in a component-oriented fashion, and it was only once that happened did React "win".
CS Modules are still not the "default", this space is still up in the air. There's CSS-in-JS (like styled-components or Emotion), Sass, plain CSS, etc.
Re: Do Not Follow JavaScript Trends
#228Earlier quoted context omitted.
As I said in that issue, I'm not completely against having Enzyme info in that page. However, we're not obligated to have the Redux docs show information on _every_ other tool that exists in the ecosystem, and our own recommendations may change over time. Right now, we have an entire docs page on how to use Immutable.js with Redux [0]. That page was submitted by a user who cared about Immutable.js. They took the time…
Really all I want is instructions on wrapping the component under test in the redux provider that don’t presume I’m using Kent’s library. It should show how to wrap, not how to call RTLs proprietary helper function. I’m not arguing that you’re violating anyone’s “rights” here, I’m arguing some of these trends feel like nepotism. The fact Redux and React are seemingly abandoning official support of Enzyme, after years…
In that time, have you stopped to consider that perhaps the incredibly narrow "legacy maintenance" use case you've been bandying about (which isn't enough to justify dedicated documentation space in a project that isn't enzyme) and your overly insulting insinuations about the authors of popular libraries are not a winning combination?
Re: Do Not Follow JavaScript Trends
#229Earlier quoted context omitted.
TypeScript? Erm... Not for me. There were many such systems in the past. CoffeeScript was a big improvement over 2010 JavaScript. Before that was GWT, which was sooo much nicer than 2006-era JavaScript. I could list a bunch of others. If you used any of them, you're now stuck with a legacy system(+), and you'll find fewer and fewer people able to read/write your code, and otherwise. I'm also not a big fan of static t…
Dependently typed language can check at compile time if you violate a ranged integer value among many other things. I'm curious though why you are not a fan of static typing? I feel like if you have a language with inference it's pretty good. I mean you could imagine python with type inference and you could essentially write anything in it you can today (baring stuff like heterogenous data structures) without specify…
(lambda (x) (* x (+ 3 x)))
A half-decade later, someone can take that code, pass a pair of specially-crafted objects to it to introspect what it does, and take a symbolic derivative, pretty-print that derivative with LaTeX, combine it with a few other pieces, and compile it into native code (and yes, that does happen).
But a lot of my code is generic in a way where types get in the way.
(2) If I do have typing, the type should usually be specified manually, but it should have semantic meaning, not be based on inferring whatever types my programming language happens to have built-in. What's important isn't that something is an integer, but that it's a count-of-apples. I should be able to compare a count-of-apples to a count-of-oranges without first converting them to a count-of-fruit.
This is especially important for numerical code, and especially in education. A lot of Scratch tutorials have little kids add a velocity to a position, without first multiplying it by a time. That leads to deep-rooted misconceptions.
I don't mind type inference if it's designed to give me feedback. I've seen a few systems (designed for students) which do things like take JavaScript:
let x=5;
let y="hello";
let z=x+y;
And flag that in the IDE. That's kinda nice. And obviously, many systems do optimization at runtime based on inferred types. That's not a problem either.
So there's a fuzzy layer in between. But the discussion was about TypeScript, not that fuzzy layer.
Re: Do Not Follow JavaScript Trends
#230Earlier quoted context omitted.
Dependently typed language can check at compile time if you violate a ranged integer value among many other things. I'm curious though why you are not a fan of static typing? I feel like if you have a language with inference it's pretty good. I mean you could imagine python with type inference and you could essentially write anything in it you can today (baring stuff like heterogenous data structures) without specify…
(1) I like generic code which I can use as I see fit later. In Scheme, I can write: (lambda (x) (* x (+ 3 x))) A half-decade later, someone can take that code, pass a pair of specially-crafted objects to it to introspect what it does, and take a symbolic derivative, pretty-print that derivative with LaTeX, combine it with a few other pieces, and compile it into native code (and yes, that does happen). But a lot of my…
The second example with count of apples and oranges is bad. Those are unitless and a thus Just an natural should be fine for them. Numerical code can get messy but that's exactly were the power of static typing is the best. You can have dimensions and units in a type system and you get dimensional homogeneity correctness for free.