Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
acemarke
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
63 ms
·
631.
▲
by
acemarke
6y ago
Like any tool, TS has tradeoffs. I wrote an extended blog post about my own experience learning and using TS, and I listed a set of takeaways and lessons learned at the end: https://blog.isquaredsoftware.com/2019/11
632.
▲
by
acemarke
6y ago
There's truth to both these statements. If the only thing you're doing with Redux is just fetching and caching data, and nothing further, there are other tools that are likely going to be more ergonomic for that (Apollo, react-que
633.
▲
by
acemarke
6y ago
There is an excellent community resource on using React with TypeScript here: https://github.com/typescript-cheatsheets/react-typescript-c...
634.
▲
by
acemarke
6y ago
I'm a Redux maintainer, and I'm _strongly_ in favor of using TypeScript for any meaningful app development [0] [1]. Also, I don't know why you're referring to thunks and sagas as "deprecated". Thunks are the re
635.
▲
by
acemarke
6y ago
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 recommendati
636.
▲
by
acemarke
6y ago
Thanks :) I also should have linked my post "Redux - Not Dead Yet!" [0], which talks about how Redux compares to other tools like context, useReducer, and GraphQL, when it makes sense to use those, and reasons why Redux is still
637.
▲
by
acemarke
6y ago
Ironically, Dan and I have spent more time trying to convince people to _not_ use Redux all the time than we have trying to actually market it :( [0] [1] We specifically have info in our docs on when it actually makes sense to use Redux [2
638.
▲
by
acemarke
6y ago
Note that our official Redux Toolkit package [0] already uses Immer by default, and we have recommended using Immer with Redux in our Style Guide docs page [1]. (We also specifically recommend _against_ using Immutable.js in that page as w
639.
▲
by
acemarke
6y ago
I'd go with `craco`, personally.
640.
▲
by
acemarke
6y ago
There are multiple existing third-party tools in the ecosystem that let you do exactly that: - https://github.com/gsoft-inc/craco - https://github.com/harrysolovay/rescripts - https://g
641.
▲
by
acemarke
6y ago
The phrasing for Jetbrains cancellation sounds a bit off. As far as I understand it, cancelling leaves you with a perpetual license for the last release where you had already paid a year's worth of subscription: https://sal
642.
▲
by
acemarke
6y ago
The idea of having some kind of special syntax in `createSlice` to support declaring thunks has definitely been suggested, and there's other libraries out there that do similar things. But, anything we add to our API has to be support
643.
▲
by
acemarke
6y ago
Been using Boostnote for the last few years. Boostnote's great, but it doesn't have note nesting / trees, so I figured I'd give Trilium a shot. Downloaded Trilium, tried to type in a standard GFM Markdown fenced code bl
644.
▲
by
acemarke
6y ago
Can you clarify what you mean by "messy" and "advanced"? Circular dependencies are indeed a potential issue, but most people are unlikely to run into that, and we talk about ways to handle that in the docs: https:/
645.
▲
by
acemarke
6y ago
Uh... wait, _what_? `useDispatch` has absolutely no overhead whatsoever. It's literally just `return store.dispatch`. There's also less "overhead" in the sense that it's not pre-binding action creators. If you meant
646.
▲
by
acemarke
6y ago
Yep, RTK is specifically written in TypeScript, and I have a co-maintainer (Lenz Weber) who has done an amazing job working on the TS typedefs to make sure it works well. See the "Usage with TypeScript" docs page: https:/&#x
647.
▲
by
acemarke
6y ago
Great, glad to hear RTK is working well for you!
648.
▲
by
acemarke
6y ago
I'm a Redux maintainer. As I said over on Reddit when this was posted: The biggest issue is that it goes directly against the principles I listed in the Redux Style Guide [0], particularly: - put as much logic as possible in reducers
649.
▲
A (Mostly) Complete Guide to React Rendering Behavior
(blog.isquaredsoftware.com)
13 points
by
acemarke
6y ago
|
0 comments
650.
▲
by
acemarke
6y ago
Note that our new official Redux Toolkit package [0] is written in TS and specifically designed to minimize the amount of types you have to declare in your code, and we have TS-specific guide pages in each of the Redux library docs sites [1
651.
▲
by
acemarke
6y ago
Glad to hear that RTK is working well for you! I'm currently working on updating the Redux core docs to teach RTK as the default way to use Redux. Hoping to have the new "Quick Start" tutorial page up in the near future.
652.
▲
by
acemarke
6y ago
Note that we specifically recommend that people _not_ put most form state in Redux: https://redux.js.org/faq/organizing-state#should-i-put-form-... Also, per the form libraries question: Formik and React Final Form ar
653.
▲
by
acemarke
6y ago
Dan Abramov put up a tweet thread agreeing with this piece, and talking about how the React team is now looking at trying to come up with some server integration capabilities to enable a hybrid model for the rest of the community: https:&#
654.
▲
by
acemarke
6y ago
Both Dan Abramov and Andrew Clark (co-creators of Redux) were indeed hired by Facebook to work on the React core. However, Dan and Andrew haven't actively touched Redux library code since mid-2016. (Dan occasionally drops into an issu
655.
▲
by
acemarke
6y ago
Funny you should ask that. Someone asked that exact question in Reactiflux a couple days ago. This was my response: > Many reasons. For one, anything that the browser supports now, it has to support... forever. For another, all browser
656.
▲
by
acemarke
6y ago
Yep. References with the details on what we tried to do in v6, and how we rewrote things in v7: - https://github.com/reduxjs/react-redux/issues/1177 - https://blog.isquaredsoftware.com/2018&#
657.
▲
by
acemarke
6y ago
I'd definitely agree there's nuances about hook behavior that a lot of folks aren't familiar with. (Dan Abramov's mammoth post "A Complete Guide to `useEffect`" [0] ought to be required reading for all React d
658.
▲
by
acemarke
6y ago
Or that Redux _was_ a reasonable choice at the time, and that with the ecosystem changing and other options available, it's worth re-evaluating use cases and updating the decision. See https://blog.isquaredsoftware.com/
659.
▲
by
acemarke
6y ago
Note that our new official Redux Toolkit package [0] simplifies most Redux use cases and logic, including eliminating the need to write action creators and action types by hand and allowing "mutating" immutable update logic in red
660.
▲
by
acemarke
6y ago
Hi, I"m a Redux maintainer. Context and hooks don't "replace Redux", but they do overlap with some of the scenarios and use cases that previously led people to choose Redux. Please see my post "Redux - Not Dead Yet!
More ›