Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
acemarke
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
59 ms
·
541.
▲
by
acemarke
6y ago
What's your preferred tool for generating TS API clients? I tried the official `openapi-generator` tool last year, but was horrified to see that a fairly small API file resulted in 5000 lines of boilerplate TS code that was trying to
542.
▲
by
acemarke
6y ago
I tried out Stoplight Studio last year as a GUI for creating OpenAPI specs, and was pretty pleased with it: https://stoplight.io/ I've also written a small custom JS script that generated an OpenAPI spec file by reflec
543.
▲
by
acemarke
6y ago
As the post says, the React team isn't saying you _should_ do that. They're just trying to make it _possible_ to do so if you _need_ to. One reason is that you can incrementally migrate parts of your app to React's upcoming C
544.
▲
by
acemarke
6y ago
React and web components are different tools trying to solve different problems. Web components are primarily about trying to add new virtual HTML tags to "extend the platform". React and other frameworks are about trying to build
545.
▲
by
acemarke
6y ago
Not exactly - this points to the release blog post, vs the changelog file.
546.
▲
by
acemarke
6y ago
That looks to be a typo in the release notes. "Server sent events" is a specific server-> client HTTP communication mechanism. The Network DevTools already showed standard AJAX requests, and support for showing messages sent o
547.
▲
by
acemarke
6y ago
Per https://webpack.js.org/blog/2020-10-10-webpack-5-release/#ge... : - Improve build performance with Persistent Caching. - Improve Long Term Caching with better algorithms and defaults. - Improve bundle size wit
548.
▲
by
acemarke
6y ago
Next.js 9.5 added opt-in support for Webpack 5: https://nextjs.org/blog/next-9-5 and looks like Create-React-App plans to support Webpack 5 in an upcoming CRA 4.1 release (4.0 is in alpha now): https://githu
549.
▲
by
acemarke
6y ago
What specific issues are you seeing? I was just trying out Yarn v2 for the first time over the last couple days. I ran the `yarn dlx @yarnpkg/pnpify --sdk vscode` command suggested on their migration guide, and that generated a confi
550.
▲
by
acemarke
6y ago
FWIW, I'm a Redux maintainer, and our docs explicitly offer some rules of thumb for when it might make sense to use Redux: https://redux.js.org/faq/general#when-should-i-use-redux https://redux.js.org&#
551.
▲
by
acemarke
6y ago
Heh. It wasn't even the rest of my team - I'm the only one who cared enough to do anything about it :) Per the post, I wanted to auto-reformat the entire codebase, as well as codemod the JS source to update it to more modern synta
552.
▲
by
acemarke
6y ago
I did something similar a couple years ago. I needed to rewrite an entire repo's history so that I could reformat all the code _and_ modernize all the JS syntax throughout every commit in the repo's history (dating back to 2013).
553.
▲
by
acemarke
6y ago
Ah... no, not in the slightest. Every major web framework's standard build tools (Create-React-App, Vue-CLI, etc), are based on Webpack + Babel, and most folks who are using one of those frameworks but setting up their own build toolch
554.
▲
by
acemarke
6y ago
No. Typescript is its own entirely separate standalone compiler toolchain. If you are using Babel as a compiler, you can enable the TS syntax plugin to have Babel strip TS type syntax out of its processing output, although this does not do
555.
▲
by
acemarke
6y ago
Pretty sure that's a reference to the Spectre CPU timing attacks and JS's SharedArrayBuffer type being used to construct timers as an attack vector: https://v8.dev/blog/spectre
556.
▲
by
acemarke
6y ago
Thank you for this! I've been a loyal BazQux user since Google Reader was killed off. It Just Works, and I've been happy to pay the subscription fee every year. I have hundreds of feeds I subscribe to, from people who post once ev
557.
▲
by
acemarke
6y ago
I gotcha covered there :) See my "Idiomatic Redux" blog post series [0] for info on how Redux was designed, why it works the way it does, and the implementation details of both the Redux core, React-Redux, and our new Redux Toolki
558.
▲
How to Correctly Evaluate Third-Party Software Libraries and Tools
(blog.isquaredsoftware.com)
2 points
by
acemarke
6y ago
|
0 comments
559.
▲
by
acemarke
6y ago
It was developed alongside React originally, but the syntax definition is now widely used in many other tools. Babel and TypeScript know how to parse JSX and compile it down to raw function calls, IDEs know how to parse it and highlight &#
560.
▲
by
acemarke
6y ago
Pasting from the linked RFC: > Other than performance this is also about a long term simplification of number of concepts you have to learn to use React. In particular, forwardRef and defaultProps are no longer something special.
561.
▲
by
acemarke
6y ago
No, that's very different, in two ways. First, `$childRef.setData()` appears to be the conceptual equivalent in React of `childClassComponentInstance.setState({someField})`. While that's technically possible, it's _extremely
562.
▲
by
acemarke
6y ago
React can be added to a page with just a script tag in the same way as Vue: https://reactjs.org/docs/add-react-to-a-website.html Having said that, React is normally used with JSX syntax, which requires a compile step.
563.
▲
by
acemarke
6y ago
A few seconds of googling turns up these relevant articles on how browsers paint via GPU (which date back many years): - https://www.chromium.org/developers/design-documents/gpu-acc... - https://www.urb
564.
▲
by
acemarke
6y ago
I don't have technical references to point to atm, but as far as I know, browsers _do_ go to great lengths to only actually repaint portions of the page that have changed. There's lots of layer compositing on GPUs, checks to see
565.
▲
by
acemarke
6y ago
I'll disagree with this a bit. It was always possible to do this in class components if you had some kind of a `setState()` call in your `componentDidUpdate` method. But, this was a rarer stumbling block. On the other hand, with hooks
566.
▲
by
acemarke
6y ago
It does reset, because toggling that flag will unmount the old instance of the component, and then mount a new instance. This is the same behavior as has always existed with class components and `this.setState()`. Component-scoped state on
567.
▲
by
acemarke
6y ago
Sure. If you've got any other specific questions, let me know and I can try to point to some relevant resources.
568.
▲
by
acemarke
6y ago
For starters, I'd suggest going through Rodrigo Pombo's walkthrough "Build Your Own React" [0], my post "A (Mostly) Complete Guide to React Rendering Behavior" [1], Dan Abramov's treatise "A Complete
569.
▲
by
acemarke
6y ago
Thank you, it's really great to hear that feedback! Totally agree that RTK works best if you already know how to write Redux code "by hand", so that you're familiar with the concepts and can see what the abstractions are
570.
▲
by
acemarke
6y ago
Heh. As a Redux maintainer, I do appreciate seeing comments like this :) Btw, if you haven't yet seen our official Redux Toolkit package, you should check it out. It includes utilities to simplify several common Redux use cases, inclu
More ›