Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
acemarke
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
49 ms
·
421.
▲
by
acemarke
5y ago
Yep, my recurring theme is "take the time to understand the use cases and tradeoffs of the tools you're looking at, and pick whatever actually solves _your_ problems". Btw, it is actually possible to use Redux Toolkit's
422.
▲
by
acemarke
5y ago
No. The React team doesn't work on _any_ official libraries except React itself. Brian Vaughn did create `react-virtualized` and `react-window`, but he maintains those separately from his status as a React team member. React Hook Form
423.
▲
by
acemarke
5y ago
Glad those are working well for you! Yeah, one of the reasons we recommend the hooks API as the default _is_ because it's so much easier to use with TS. It's _possible_ to use `connect` with TS, but the typing overloads are a comp
424.
▲
by
acemarke
5y ago
Fortunately, you no longer need to "install a bunch of middleware" yourself - Redux Toolkit's `configureStore` gives you a good default setup out of the box [0], and we have TypeScript usage guidelines that infer all the need
425.
▲
by
acemarke
5y ago
Hi, I'm a Redux maintainer. Note that we have considerably changed the Redux patterns that we teach over the last couple years to make it easier for folks to learn and use Redux. We now teach using our Redux Toolkit package as the defa
426.
▲
by
acemarke
5y ago
FWIW, the very first thing I thought of when I saw SQLite was "huh, I can think of a couple apps where I'd like to upload some images". You could do that with Access, but it struggled with file sizes. SQLite's file form
427.
▲
by
acemarke
5y ago
It seems like you're talking about the APIs for a specific library (React Hook Form) rather than React in general. Overall, hooks allow libraries to package custom behavior. The `useSelector` hook mentioned above is a React-Redux-speci
428.
▲
by
acemarke
5y ago
"It Depends"? :) Typically if you've got a single React component type that is supposed to be reused in multiple places with differing behavior, the right answer is "pass in something as a prop". In this case, that
429.
▲
by
acemarke
5y ago
Note that we created our official Redux Toolkit package [0] specifically to solve the "boilerplate" concerns. It includes utilities to simplify several common Redux use cases, including store setup, defining reducers, immutable u
430.
▲
by
acemarke
5y ago
Yes, we specifically recommend that most "form state" should _not_ go directly into Redux: - https://redux.js.org/style-guide/style-guide#avoid-putting-f... - https://redux.js.org/faq/org
431.
▲
by
acemarke
5y ago
Yeah, unfortunately there's been lots of folks out there who have tried to insist that Redux should be used everywhere, all the time, and ignored the guidance we've offered over the years on when it _might_ make sense to use Redux
432.
▲
by
acemarke
5y ago
We specifically recommend that most folks should _not_ try learning Redux until after they're already comfortable with React: https://redux.js.org/tutorials/essentials/part-1-overview-co...
433.
▲
by
acemarke
5y ago
Do you have any good examples of this in action and showing configuration? I've been wrestling with this as we work on finalizing the new "RTK Query" APIs for Redux Toolkit. I'd love to have some auto-generated TS API do
434.
▲
by
acemarke
5y ago
Interesting. I recently found a similar tool that appears to be in alpha, at https://paka.dev . I'm actually interested in trying to find a TS API docs generation tool that I could integrate with Docusaurus for use with the
435.
▲
by
acemarke
5y ago
RTK Query was heavily inspired by React Query, Apollo, Urql, and SWR, in terms of API design and problem space. But, it has some unique differences in approach as far as specifying what API endpoints you interact with. See these links for
436.
▲
by
acemarke
5y ago
I haven't looked at Kea in a while, but I'll toss out some comparisons based on my knowledge of RTK and what I remember about Kea + looking at its docs. Kea's main selling point is that it lets you define self-contained chunk
437.
▲
by
acemarke
5y ago
There was a thread on this just a couple days ago: https://news.ycombinator.com/item?id=26972400
438.
▲
by
acemarke
6y ago
Note that our official Redux Toolkit package specifically resolves most of the concerns people have expressed over the years about "Redux boilerplate", including drastically simplifying writing reducers and actions and including s
439.
▲
by
acemarke
6y ago
Yeah, I _was_ sorta wondering that, actually :) I think it went from being a single blog post, to its own subdomain, and now to a totally different site? Kinda weird progression. Love the advice overall, and I've tried to apply that a
440.
▲
by
acemarke
6y ago
> From what I gather, your ask is to add information about the usage of the toolkit and steer people towards that. Is that correct? If so, I don't mind adding it, but I think the existing information is helpful. Basically, yes. The
441.
▲
by
acemarke
6y ago
That's wrong. Dan created Redux while he was actually unemployed. I'd have to check the exact timeline, but I believe he left Stampsy in late 2014 or early 2015, and was actually getting some funding from an OSS collective-type t
442.
▲
by
acemarke
6y ago
If you like the stuff in RTK so far, I think you're going to like our upcoming "RTK Query" API, which adds a React Query-inspired data fetching abstraction: https://rtk-query-docs.netlify.app We're working on
443.
▲
by
acemarke
6y ago
Note that we have _always_ advised that you should avoid putting literally every piece of state into the Redux store, and we do _strongly_ encourage keeping local state in components: - https://redux.js.org/faq/organizi
444.
▲
by
acemarke
6y ago
And that's exactly why we have a core docs "Fundamentals" tutorial that _does_ walk through the "how it works underneath", but culminates in "and now that you know how to write this code by hand, use RTK and ne
445.
▲
by
acemarke
6y ago
I'm not sure how you're looking at that docs page and saying that it "devolves into the same old". That page explicitly shows how RTK simplifies existing Redux patterns. Yes, concepts like "thunks" and "r
446.
▲
by
acemarke
6y ago
FWIW, Redux has _never_ been a Facebook project. Yes, both of the creators now work on the React team (Dan Abramov and Andrew Clark), but it's always been an independent OSS project, and is currently maintained by myself and Tim Dorr.
447.
▲
by
acemarke
6y ago
We specifically recommend using our official Redux Toolkit package, rather than `typesafe-actions`. RTK is already written in TS and designed for a solid TS usage experience: https://redux-toolkit.js.org
448.
▲
by
acemarke
6y ago
I do get the arguments that you're making here about Svelte, and don't disagree. That said, "Modern Redux" code is very different than what you've probably seen even just a couple years ago. We've introduced n
449.
▲
by
acemarke
6y ago
My point is that the code that shown in this tutorial is, from our point of view, "wrong" at this stage. We _don't_ want people writing action constants, object spreads, or action creators by hand any more, or splitting Redux
450.
▲
by
acemarke
6y ago
The patterns shown in this tutorial are outdated and not what we currently recommend. "Modern Redux" code is very different than what this and other older tutorials show. We've introduced newer APIs like Redux Toolkit, which
More ›