Twitter | Search | |
Mark Erikson
Jack-Of-All-Trades code monkey. Collector of interesting links. Answerer of questions. Writer of very long posts. Redux maintainer. Nerd, geek, gamer.
17,892
Tweets
143
Following
10,061
Followers
Tweets
Mark Erikson 14m
STOP STEALING MY IDEAS BEFORE I CAN SUGGEST THEM OR SOMETHING
Reply Retweet Like
Mark Erikson 25m
Seems doable. Say, write in TS, lightly-compile to modern ES and ES5, format all with Prettier for consistency?
Reply Retweet Like
Mark Erikson 26m
Per that linked FAQ entry, some rules of thumb to help decide what _might_ go into Redux: - Needed elsewhere? - Derive from this data? - Used by multiple components? - Should time-travel? - Should cache? - Should stay consistent?
Reply Retweet Like
Mark Erikson 1h
TOTALLY disagree. Putting literally everything in Redux _is_ a valid technical choice, for the reasons you listed. But, you shouldn't do that, per the linked FAQ entries. There's still plenty of value in time-traveling app-wide state. Not so much for "is this dropdown open?"
Reply Retweet Like
Mark Erikson 2h
Replying to @alex_yetto @endymion_r
sadly, basically this. To be clear, I'm fully aware that Redux is both over-used and no longer as "needed" as it once was. I just want to clear up the FUD that gets thrown around about it being "dead", clarify when and why to use it, and make it easier to learn and use.
Reply Retweet Like
Mark Erikson retweeted
Alex Zherdev 2h
out there doing god's work. thanks I envy your patience.
Reply Retweet Like
Mark Erikson 2h
We'll try to clarify that as part of the Redux docs rewrite we're doing. We _do_ already have FAQ entries with suggestions on deciding what state should go in Redux:
Reply Retweet Like
Mark Erikson 2h
I've said a number of times that the Redux "Three Principles" doc page statement on "A Single State Tree" needs to be modified, along the lines of "A Single State Tree, for whatever you want to put in the global state, but not literally _every_ value in your app".
Reply Retweet Like
Mark Erikson retweeted
Erik D. Kennedy 3h
⚠️For the next 120 minutes, I'll be giving (near-instantaneous) UI feedback on your web/app designs. Reply with a screenshot of something you're working on. (And retweet to keep me busier)
Reply Retweet Like
Mark Erikson 3h
Yeah, I know :) We can only do so much.
Reply Retweet Like
Mark Erikson 3h
I've been generally hesitant to add APIs just to support TS-specific use cases, but I could see justification for something like that. It seems unobtrusive and opt-in, and doesn't force us to drop the object notation. Related, this would be great in a "Usage with TS" docs page.
Reply Retweet Like
Mark Erikson 3h
Right, I was more meaning something like a small paragraph at the start of the docs somewhere saying "The docs are written using modern JS syntax. If you're not familiar with some of those aspects, see the [JS Syntax Overview] page for explanations."
Reply Retweet Like
Mark Erikson 4h
So what is the major benefit there? Verifying that the action payload type correctly matches the reducer?
Reply Retweet Like
Mark Erikson 4h
Replying to @AdamRackis
also: - linking - ABIs and endianness - the preprocessor - "move semantics"
Reply Retweet Like
Mark Erikson 4h
Oooo, that'd be neat!
Reply Retweet Like
Mark Erikson 4h
I want to have some kind of a "Related Concepts" section in the Redux docs that explains things like side effects, immutability, etc. Perhaps it should also include a short section explaining the commonly used syntax as well?
Reply Retweet Like
Mark Erikson 4h
Replying to @TensorNo @wgao19 and 2 others
Not sure about the v1 part, but I see it listed in the v2 docs:
Reply Retweet Like
Mark Erikson 4h
Replying to @TensorNo @wgao19 and 2 others
Great idea! How much work would it be to have this "multi-language snippet" thing set up for Docusaurus v2?
Reply Retweet Like
Mark Erikson 4h
Sure, seems reasonable. For thunks specifically, though, all these variations are equivalent: function ac() { return function thunk(dispatch) {} } function ac() { return (dispatch) => {} } const ac = () => (dispatch) => {} Last is shorter, but much more obscure.
Reply Retweet Like
Mark Erikson retweeted
Mark Erikson 5h
and those aren't rhetorical questions atm, either. We're starting a major docs rewrite, and I'm genuinely wondering what level of syntax we should be targeting.
Reply Retweet Like