Post ATLLGLbhehD9ku4saG by phryneas@chaos.social
 (DIR) More posts by phryneas@chaos.social
 (DIR) Post #ATKB4pNFxmhrtxEEuO by seldo@alpaca.gold
       2023-03-06T02:11:04Z
       
       0 likes, 0 repeats
       
       The official "how to use Redux" tutorial is literally 7 hours of "here's how to do it" followed immediately by a part 8 which is "j/k you don't need to do any of that stuff we wrote a library" and I have some feedback on the structure of this documentation.
       
 (DIR) Post #ATKJ5acl5WKk4uM0Xo by norgralin@hachyderm.io
       2023-03-06T03:40:52Z
       
       0 likes, 0 repeats
       
       @seldo I don’t understand how so many clearly intelligent people can work in JavaScript yet the eco system is such a shit show. A year ago, I was trying to get a javascript compiler working. It was basically a pile of modules with some Ikea directions.
       
 (DIR) Post #ATKM1CMRehmNX1JyOe by bcdavid@hachyderm.io
       2023-03-06T04:13:42Z
       
       0 likes, 0 repeats
       
       @seldo Working with Redux when it first came out was also like this. Except instead of 7 hours, it was several years of devs struggling to use it in a reasonable way before RTK came along with sane patterns. Although by that point many had started dropping it and moved on to things like react-query after realizing almost all their state was data synchronization anyway.
       
 (DIR) Post #ATKWNCwt9LlrGcV7Ng by poswald@mastodon.social
       2023-03-06T06:09:34Z
       
       0 likes, 0 repeats
       
       @seldo ah, the classic "eat your vegetables" tutorial structure.
       
 (DIR) Post #ATLIErEOo5nDOVm8Rc by acemarke@mastodon.social
       2023-03-06T15:05:58Z
       
       0 likes, 0 repeats
       
       @seldo Hi, I wrote that "Redux Fundamentals" tutorial.The intent of that tutorial is to explain "here's how it works, from the ground up".  It's aimed at people who prefer to understand concepts from first principles and "how things work inside" before using something.We _also_ have an "Essentials" tutorial, which jumps straight into "Here's how we _want_ people to use Redux today, with Redux Toolkit as the default".All that said, I'm genuinely curious to hear your feedback!
       
 (DIR) Post #ATLIcxc8j8UY8mNBrs by seldo@alpaca.gold
       2023-03-06T15:10:22Z
       
       0 likes, 0 repeats
       
       @acemarke So, coming into it from nowhere, there's little indication about whether "essentials" or "fundamentals" are a better place to start. The end of the "quick start" suggests doing both without saying in what order or how they differ (the tutorials index page does, but I didn't find that page until I was writing this message).
       
 (DIR) Post #ATLIjxIIJcUbAuQTBo by seldo@alpaca.gold
       2023-03-06T15:11:03Z
       
       0 likes, 0 repeats
       
       @acemarke Google searches for how to do various things in redux kept landing me on Fundamentals and not on Essentials.
       
 (DIR) Post #ATLIqxs6ZB0qzeWCGG by seldo@alpaca.gold
       2023-03-06T15:12:59Z
       
       0 likes, 0 repeats
       
       @acemarke RTK Query was described as "new" and "not essential" so I avoided the Essentials tutorial on the basis that it was introducing more concepts than I seemed to need at once.
       
 (DIR) Post #ATLJ7iKLc6MjhpiPOS by seldo@alpaca.gold
       2023-03-06T15:16:00Z
       
       0 likes, 0 repeats
       
       @acemarke The introduction section clearly says "Redux toolkit is how you should learn redux" (https://redux.js.org/introduction/why-rtk-is-redux-today) (good!) but nowhere does it say "Redux essentials is the tutorial that teaches you how to use redux toolkit" and nowhere in the outline of Essentials is the word "toolkit" (unless you know in advance what RTK stands for).
       
 (DIR) Post #ATLJHtuJPj3yW6OXYW by phryneas@chaos.social
       2023-03-06T15:17:44Z
       
       0 likes, 0 repeats
       
       @seldo I generally agree that it could be even more obvious, but the first chapter of the Fundamentals tutorial contains this info box:
       
 (DIR) Post #ATLJTqKoWRxOuaU9bM by seldo@alpaca.gold
       2023-03-06T15:19:52Z
       
       0 likes, 0 repeats
       
       @phryneas I couldn't find that box even after you told me it was there, though I have found it now.
       
 (DIR) Post #ATLJhjvn7y7v6bPLH6 by acemarke@mastodon.social
       2023-03-06T15:22:26Z
       
       0 likes, 0 repeats
       
       @seldo Thanks for the feedback (seriously)!Filed as https://github.com/reduxjs/redux/issues/4495 .I'm flying today - maybe I can knock out some of these on the way.Quick thoughts:- We do say "Start with Essentials" here: https://redux.js.org/tutorials/index- Google hits are likely because I set up redirects from the _original, old_ Redux tutorial URLs to the matching "Fundamentals" pages, so SEO juice- Should really change that RTKQ phrasing, then- We should add "this is theory" callouts on each Fundamentals page
       
 (DIR) Post #ATLJoz0FUNTpsRwk3k by seldo@alpaca.gold
       2023-03-06T15:23:16Z
       
       0 likes, 0 repeats
       
       @acemarke Thanks for taking a constructive approach to my grumpy shouting-into-the-void!
       
 (DIR) Post #ATLKApJuAdj6DVYYgC by acemarke@mastodon.social
       2023-03-06T15:27:30Z
       
       0 likes, 0 repeats
       
       @seldo Sure! It's very legit and valid feedback, and I take _almost_ all Redux critique seriously. (well, at least any that have actual thought and justification behind them :)  plenty of _bad_ critiques out there, which is its own never-ending source of annoyance.)
       
 (DIR) Post #ATLLGLbhehD9ku4saG by phryneas@chaos.social
       2023-03-06T15:39:55Z
       
       0 likes, 0 repeats
       
       @seldo It's just too much content ^^I fear even if we add some blinking red box on top of every tutorial page, 50% of people might skip it.But it seems Mark is pretty much trying that, and I'm all for it.
       
 (DIR) Post #ATLnFQwp6wHukKJE9o by acemarke@mastodon.social
       2023-03-06T20:25:20Z
       
       0 likes, 0 repeats
       
       @phryneas @seldo I'm playing around with adding a callout box to each "Fundamentals" page. Here's my first attempt - modified the text from Part 1, pasted it into Part 2 and wrapped it in a yellow "warning" callout.Thoughts on both wording and coloring? Should I use blue/green/red instead? Different wording? What would be best here?https://deploy-preview-4496--redux-docs.netlify.app/tutorials/fundamentals/part-2-concepts-data-flowhttps://github.com/reduxjs/redux/pull/4496
       
 (DIR) Post #ATLnFRzhDkBDzWf2H2 by seldo@alpaca.gold
       2023-03-06T20:53:24Z
       
       0 likes, 0 repeats
       
       @acemarke @phryneas I like to believe that I would have spotted this as-is.
       
 (DIR) Post #ATLnQt82fv8DKj1DDU by seldo@alpaca.gold
       2023-03-06T20:55:21Z
       
       0 likes, 0 repeats
       
       @acemarke @phryneas In terms of emphasis, instead of pointing to part 8 first (which still gives the impression that you're on the right tutorial and have to read all the way through) I would point to Redux essentials first.
       
 (DIR) Post #ATLna2dsfoV7RfH93w by acemarke@mastodon.social
       2023-03-06T20:50:28Z
       
       0 likes, 0 repeats
       
       @seldo btw, can you give me some examples of the Google searches you were using?
       
 (DIR) Post #ATLo4EbSlcsPEGXeC0 by seldo@alpaca.gold
       2023-03-06T21:02:31Z
       
       0 likes, 0 repeats
       
       @acemarke Just "redux tutorial" has Fundamentals as #1 for me; my search history doesn't seem to stretch back far enough to find any of the others that led me there.
       
 (DIR) Post #ATM3LhQEN4xEqQ4dl2 by collin@mastodon.social
       2023-03-06T23:21:38Z
       
       0 likes, 0 repeats
       
       @bcdavid @seldo yeah, I remember when it dawned on me that redux is mostly used as a bad http cache without the advantage of making the runtime/protocol take responsibility.And then for anything that actually resembles an app with complex state management needs, I’m looking for something much more batteries included.
       
 (DIR) Post #ATM3Li6PqEhMxFoKVk by seldo@alpaca.gold
       2023-03-06T23:53:41Z
       
       0 likes, 0 repeats
       
       @collin @bcdavid what would you suggest? This is the first time I have a react app complicated enough that I'm looking for any state management.
       
 (DIR) Post #ATMANgYhFg4cQOvaIS by acemarke@mastodon.social
       2023-03-07T01:12:29Z
       
       0 likes, 0 repeats
       
       @seldo Yep, I see "Fundamentals" as the top hit as well. "Essentials" is... halfway down the page, after 5 videos and 4 other sites :(No idea how to fix _that_.
       
 (DIR) Post #ATMDWoro1zmMf2ufho by acemarke@mastodon.social
       2023-03-07T01:47:07Z
       
       0 likes, 0 repeats
       
       @seldo @phryneas   Okay, I flipped the link orders, used the same yellow callout on Part 1, and added a different callout on Part 5 (since `useSelector` is modern React-Redux, but I wanted _something_ to clarify `connect` is old and the logic in the other pages is old).Pushed an update to the PR. Any further suggestions?
       
 (DIR) Post #ATMMPKHoEJcdNSZsJ6 by collin@mastodon.social
       2023-03-07T03:27:19Z
       
       0 likes, 0 repeats
       
       @seldo @bcdavid Personally I love the mobx flavor of state management. Mobx-keystone in particular is my kind of thing. ( Though it’s a little light on docs and the community is smaller. )I’m working on a side project that’s sort of like figma, so lots of recursive structures with a rich graph of relationships.In general I like to have my state management be either almost not there at all, or a full-on ORMish abstraction.
       
 (DIR) Post #ATMMxCWdahGb9ZfMyO by collin@mastodon.social
       2023-03-07T03:33:23Z
       
       0 likes, 0 repeats
       
       @seldo before I settled on mobx I used to do some mashup of redux + https://github.com/immerjs/immerMy perspective is: I get the why command pattern and immutable data are good. But typical redux use looks like 50% line noise to have copy-on-write behavior.I think code that looks like mutation reads better as “business logic”, and a lot of tv redux ecosystem is like a disjointed version of “heftier” state management solutions.
       
 (DIR) Post #ATMNOe1HTZU0FC5MOW by collin@mastodon.social
       2023-03-07T03:38:20Z
       
       0 likes, 0 repeats
       
       @seldo sigh, state management can be such a pain, it’s like css. Actually super cool, but everybody has a horror story or two they’re scared to repeat… And if it starts to get out of control it’ll be hell no matter what you chose :cry: Godspeed!
       
 (DIR) Post #ATMVyJkN7sabQZhJaa by bcdavid@hachyderm.io
       2023-03-07T05:14:35Z
       
       0 likes, 0 repeats
       
       @seldo @collin Personally, I like react-query because the things I work on are usually just UI responding to some sort of async data synchronization. SWR is also good if you are sensitive to bundle size (although react-query is not all that much bigger). I've also really enjoyed XState for those cases where I get to work on something that really benefits from that type of robust state management. I've used it on a few projects now, and being able to visualize my app with state charts is amazing.