Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
acemarke
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
96 ms
·
871.
▲
by
acemarke
7y ago
I have that talk bookmarked to watch, but my bookmarks queue is like 600+ deep at this point :) Just going by your summary: Yeah, I do find it interesting how some different parts of the community have chosen to format their action strings
872.
▲
by
acemarke
7y ago
I will gladly take any suggestions on how we can improve the docs in general, and the tutorials specifically :)
873.
▲
by
acemarke
7y ago
We're already planning to revamp the docs in the _very_ near future (like, hopefully starting in the next couple weeks once I get Redux Starter Kit 1.0 out the door). See my proposed changes here: https://github.com/red
874.
▲
by
acemarke
7y ago
I'll disagree with you on that last point. We specifically encourage that pattern - treating actions as "events" that any part of the reducer logic can respond to independently, rather than "setters". Now, it'
875.
▲
by
acemarke
7y ago
Yep, agreed. The biggest missing capability there is being able to _respond_ to dispatched actions, which thunks can't do. But, most apps don't immediately need to do that anyway.
876.
▲
by
acemarke
7y ago
Note that Redux Starter Kit is built in TypeScript itself, and `createSlice` makes it easy to write all the logic for a given slice in a single file. Then, combine that with our new React-Redux hooks API, and it really gets easy to work wi
877.
▲
by
acemarke
7y ago
It's definitely _not_ necessary, and that's exactly what our Redux Starter Kit package can help with! See the `createSlice` function in particular: https://redux-starter-kit.js.org/api/createSlice https:&#x
878.
▲
by
acemarke
7y ago
Sagas are an incredibly powerful tool... and 95% of Redux apps don't need them. Most apps should stick with thunks until they truly have a need for very complex async logic. See this Redux FAQ entry for more details: https:/
879.
▲
by
acemarke
7y ago
And that is something we explicitly suggest that people _not_ do: https://redux.js.org/faq/organizing-state#do-i-have-to-put-a... https://redux.js.org/faq/organizing-state#should-i-put-form-...
880.
▲
by
acemarke
7y ago
Yep, this is something I plan to do in our upcoming docs revamp. The initial tutorials will drop action creators, drop `const ADD_TODO = "ADD_TODO"`, drop splitting things into multiple files, etc. And yeah... a lot of the stuff
881.
▲
by
acemarke
7y ago
Hi, folks. I'm a Redux maintainer. Wanted to let everyone know about the two major things we're working on at this point. First, we have a new official package called Redux Starter Kit [0], which is our recommended toolset for w
882.
▲
by
acemarke
7y ago
I'll disagree. Like code comments vs code, actual descriptive text can cover much more than just commit messages. I keep a daily work journal, and I write down: - What I was working on - Who I talked to, and about what - Problems I ra
883.
▲
by
acemarke
7y ago
FWIW, if you've worked with Mithril, I would think it would be fairly easy to start picking up React. I have a list of suggested resources for learning React here: https://blog.isquaredsoftware.com/2017/12/blo
884.
▲
by
acemarke
7y ago
Babel compiles whatever you tell it to, and each piece of syntax is a separate plugin. For `babel-preset-env` specifically, it compiles whatever syntax is not natively supported by the browser versions you told it to target. So, compiling `
885.
▲
by
acemarke
7y ago
Per my comment, by default it doesn't matter whether props change or not . If the parent component renders, its children will too. It's only when you're _trying_ to optimize the child that the new function reference matt
886.
▲
by
acemarke
7y ago
In general, the notion of "declaring functions in render is bad for perf" is a result of several things: - Declaring functions (especially arrow functions) _may_ have had a more noticeable cost in older JS engines - Misunderstandi
887.
▲
by
acemarke
7y ago
Python 3 has optional static typing: https://docs.python.org/3/library/typing.html https://realpython.com/python-type-checking/
888.
▲
by
acemarke
7y ago
I ran across FastAPI earlier this year and did a tiny prototype to play with it. Selling points for me: - Integrates nicely with some existing libraries (Starlette, Pydantic) - Well documented - Auto-validation of endpoints from data model
889.
▲
by
acemarke
7y ago
I'd love to see some more details on the tooling they created to generate OpenAPI schemas by extracting types from their code. Related: are there any good Python libs for doing request/response validation based on OpenAPI v3 schem
890.
▲
by
acemarke
7y ago
Immutable.js implements a specific set of data structures that internally share references. When you add a new field or copy an object, Immutable.js doesn't have to completely recreate things. For small objects this doesn't matt
891.
▲
by
acemarke
7y ago
Glad to hear it! Please let me know if you have any further feedback from using it. Here's the current roadmap towards 1.0: https://github.com/reduxjs/redux-starter-kit/issues/82 I just pushed out a bre
892.
▲
by
acemarke
7y ago
Shallow object comparison is not a special property of Immutable.js. It's just a matter of iterating over the keys and values of two objects and comparing them. In fact, that's how React-Redux (and many other React ecosystem lib
893.
▲
by
acemarke
7y ago
Yep. Michel Weststrate is a genius, and also an all-around nice guy. I hope to have a chance to meet him in person. (For reference, I'm a Redux maintainer. We now recommend Immer as the best way to write immutable update logic in Re
894.
▲
by
acemarke
7y ago
Ironically, there's a name clash with a fairly popular immutable update library for JS: https://github.com/immerjs/immer Looks like the C++ one started first (2016-05 vs 2017-12).
895.
▲
by
acemarke
7y ago
Just out of curiosity, is that in production mode, or just in development?
896.
▲
by
acemarke
7y ago
Glad to hear it! I just wrote a tutorial that shows how to use Redux Starter Kit, TypeScript, thunks, and React-Redux hooks together. Should hopefully be a big help, for the reasons you described: https://redux-starter-kit.js.or
897.
▲
by
acemarke
7y ago
FWIW, the "stale props/zombie child" issues described in the React-Redux hooks docs [0] really have nothing to do with the hooks themselves. It's a combination of: - The long-standing problem of trying to synchronize an
898.
▲
by
acemarke
7y ago
Original source was Ryan Florence: https://twitter.com/ryanflorence/status/1125041041063665666
899.
▲
by
acemarke
7y ago
Please check out our new Redux Starter Kit package [0]. It includes utilities to simplify several common Redux use cases, including store setup, defining reducers, immutable update logic, and even creating entire "slices" of state
900.
▲
by
acemarke
7y ago
Note that context and useReducer do _not_ completely replace Redux. See the following resources for more details: - Mark Erikson - Reactathon 2019: The State of Redux ( https://blog.isquaredsoftware.com/2019/03/pres
More ›