Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
acemarke
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
11 ms
·
61.
▲
by
acemarke
2y ago
Afraid that's not accurate. The package size I linked is specifically the `react-dom.production.min.js` bundle that is used on the client side. The `react-dom` package does include _separate_ bundles used for server rendering, but that
62.
▲
by
acemarke
2y ago
Nope, ReactDOM is 132K min, 42K gzipped: - https://unpkg.com/browse/react-dom@18.2.0/cjs/ - https://bundlephobia.com/package/react-dom@18.2.0
63.
▲
by
acemarke
2y ago
Hmm. Trying to understand what you're suggesting here. You can pass _any_ JS value as a prop to a child component, and there's nothing special about any of that as far as React is concerned. You can pass a primitive, an object, a
64.
▲
by
acemarke
2y ago
Conceptually, a `<Suspense>` component acts like a `try` boundary around a given component subtree. If _any_ component inside of that subtree suspends, it needs to "bubble up" to the ancestor `<Suspense>`. But, React
65.
▲
by
acemarke
2y ago
I'd both agree and disagree with that. React is based on the core concepts of encapsulated components, with the ability to manage state on a per-component-instance basis, and for parent components to pass _any_ values they want to thei
66.
▲
by
acemarke
2y ago
Note that Redux usage patterns have changed significantly since 2019. Modern Redux with our official Redux Toolkit package is drastically simpler and easier to use than the original legacy hand-written patterns: - https://redux.
67.
▲
by
acemarke
2y ago
Hi, I'm a Redux maintainer. Context is not an "improvement" over Redux, because they are different tools with different purposes. (This is the primary misunderstanding people have when they try to compare Context and Redux.)
68.
▲
by
acemarke
2y ago
I know what "MVC" _stands_ for, but I'm asking what _context_ you mean that in. Are you talking about how to define your server-side data models and endpoints? How you're organizing client-side fetching and caching? Norm
69.
▲
by
acemarke
2y ago
Hi, I work at Replay.io. There's a very good reason for that "custom browser" requirement. Session replay tools like LogRocket or Jam do capture a lot of information, but they can only capture what's _in_ the page, and a
70.
▲
by
acemarke
2y ago
Can you clarify some terms here? - What do you mean by "React as a library"? Using it as a pure SPA with a bundler like Vite? Using it as a plain `<script>` tag? - What do you mean by "go back to MVC"? What does
71.
▲
by
acemarke
2y ago
Depending on how you slice the numbers, it seems plausible. If you look at https://npm-stat.com/charts.html?package=react&package=react... : - The older `react-query` package is 1.6M DL/w, the newer `@tanstack/
72.
▲
by
acemarke
2y ago
I did title it "_Mostly_ Complete Guide" for a reason :) Everything in that post should still be 100% accurate and relevant. I specifically did _not_ try to go into further details on Suspense or some of the intricacies of Concurr
73.
▲
by
acemarke
2y ago
React 19, a library release, is completely separate from the eventual release of the React Compiler build tool (which is currently implemented as a Babel plugin wrapper around a full compiler implementation core). That said, React Compiler
74.
▲
by
acemarke
2y ago
Not at this time. I'm pretty full up at this point with day job ( https://replay.io ), conferences, and personal life stuff. My current ongoing Redux maintenance task is trying to revamp our "Redux Essentials" tut
75.
▲
by
acemarke
2y ago
It's now called "React Compiler". It's not released yet, but the dev team has been saying it'll be out _after_ React 19 but "sooner than you think": - https://react.dev/blog/2024/
76.
▲
by
acemarke
2y ago
Oh hey, that's my post! Note that I did a fairly extensive update to it in 2022 to cover React 18.
77.
▲
by
acemarke
3y ago
Is there a reason why you created this rather than using our official RTK Query data fetching layer? It's already included in Redux Toolkit, and it's our recommended approach for fetching data in Redux apps: - https://r
78.
▲
by
acemarke
3y ago
Note that this article is from 2019, and that's when Redux usage changed _significantly_. We now have our official Redux Toolkit package as the standard way to write Redux code. It significantly shrinks the amount of code needed to wr
79.
▲
by
acemarke
3y ago
Yeah, I did a talk on "Debugging JavaScript" that really is mostly language-agnostic and focuses on the core scientific method approach: - https://blog.isquaredsoftware.com/2023/06/presentations-debu...
80.
▲
by
acemarke
3y ago
Rome was never from Meta. It was started by Sebastian Mackenzie, who _did_ work at Meta at one point, but it was always an independent project (and later a VC-funded company).
81.
▲
by
acemarke
3y ago
Redux will never be the _absolute_ shortest way to write updates - it intentionally adds a level of indirection (the concept of "dispatching actions"). That said, we specifically created Redux Toolkit to drastically simplify stand
82.
▲
by
acemarke
3y ago
Meta has all of its own backend and frontend infrastructure. So no, they don't use something like Next. If anything, Next and RSCs are sort of an attempt to make a more generic version of some of Meta's internal infrastructure.
83.
▲
by
acemarke
3y ago
Hi, I'm a Redux maintainer. I'm kind of confused by your comment in a couple ways. I'm not sure why you're jumping to discussing Redux here - we're a completely separate project from React, and nothing about the par
84.
▲
by
acemarke
3y ago
Hi, I'm a Redux maintainer. A few notes here: - It was never necessary to write `mapDispatchToProps` as a function. `connect` always supported an "object shorthand", where you passed in an object full of action creators, and
85.
▲
by
acemarke
3y ago
React is a JS library, so it needs a JS runtime to execute outside the browser. It's hypothetically possible to use a JS runtime as a subprocess from another language to use React for plain HTML SSR, but it probably wouldn't work
86.
▲
by
acemarke
3y ago
Exactly - that's what we've already built for web development at https://replay.io :) I did a "Learn with Jason" show discussion that covered the concepts of Replay, how to use it, and how it works: - https:
87.
▲
by
acemarke
3y ago
Some possible reasons: - React already used JSX, so no reason to suddenly change - JSX can be type-checked by TS - Template literals aren't going to contain flow control the way JSX can
88.
▲
by
acemarke
3y ago
React has not had a _stable_ release since June 2022. They publish "experimental" releases on a near-daily basis, and have had numerous "canary" releases. They talked about the "canary" strategy early in 2023:
89.
▲
by
acemarke
3y ago
This came out as part of the new React docs site at React.dev, which was launched earlier this year. (There's been a lot of debate about that within the React community since it happened.)
90.
▲
by
acemarke
3y ago
React actually has a little-known "same element reference" optimization. If your component returns the exact same JSX element reference in the same spot in consecutive renders, React will bail out of rendering that subtree, regard
More ›