-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rewrite React-Redux docs completely #1001
Comments
Hey, Mark. This request is right up my alley, let me do some research into this later on today and see what sort of timeline I'm looking at. |
Awesome, thanks - really appreciate it! I'd previously discussed this with @jsonnull . One note from a discussion:
Might be a place to start. |
Since Redux + React is such a common combo, I'd rather keep it all under the redux.js.org site. There's already a ton of React code in those docs anyways. And it also has the side effect of being more discoverable that way (one single search bar for both libraries). We can point everything here to that page (or pages!). We can also consolidate the API reference, so there's one place for all the API docs. |
Hi, Mark! Really happy that you talked to us about the rework on these docs. I'm back home & work now and I'd love to start helping! For 1. Generate HTML docsite using gitbook, following the In the beginning of this post you mentioned:
I think it's a good idea to follow the 2. "How-to" and "How It Works"
I do believe with a how-to guide with example it is much faster to get hands on on using redux with react. And this is perhaps a major chunk of work for this rewrite. Luckily I think the API doc is very well-written. I've personally learned a lot by reading it (thanks again for talking to me about this)! For this part, can I try to write a draft up? Any more resources or good examples of such guides I can learn from?
The "Using React with Redux" page looks like a simple guide with example. Should we work on that example directly?
I like the slides in your tutorial. Perhaps I can try writing up this section using them as a foundation? 3. Add Advanced Topic / Recipes / FAQ section I think the Recipes section of the Oh and reading the current doc I'm afraid I also don't quite understand the factory function part so I need more resources to learn about it as well. I see we have a troubleshooting.md file to work on (It actually contains some classic "traps" I ran into 😂). 4. Trim the current I think the current So I'm thinking of a outline like this:
I think in the beginning I was quite clueless about what can be done. And after reading the doc and the Thanks and looking forward to joining to help :) |
@wgao19 : Hiya! Thanks for looking into this. A couple quick thoughts:
@ConnorBryan , have you had a chance to look into any of this yet? Hopefully the two of you can collaborate on this. |
Thank you @markerikson that is a lot more learning resources to look into. I will read and watch them in the following few days and start drafting stuff. |
@wgao19 I would be honored to work on this with you; are you on Discord at all? That's my primary place to communicate in real time; I think that might be the best way to hash this out. |
hey @ConnorBryan yes I am on discord |
@wgao19 I'm having trouble locating you -- can you add |
Per discussion, we're setting up a Dropbox Paper doc to throw together an outline, same as we did for the main Redux docs: |
I would also love to participate in the rewrite of the docs, if you'll have me. I have a bit of experience with redux, and a lot of experience with React. I also have written quite a few popular tutorials on React as well as webpack, so I might be helpful there. Is there still room for contributions @markerikson? In the meantime, I'd love to start outlining @wgao19's "How it Works" section. |
@maecapozzi Hi, Mae! Yes, absolutely :) I think Carl Vitullo said you have some background with tech writing/editing too, which we could definitely use. I just gave you edit rights to the Dropbox Paper doc, so go ahead! (If anyone else out there is specifically interested in helping work on the outline / notes, comment here and open up the doc while logged into Dropbox, so I can give you edit rights.) |
@maecapozzi : sent a DM over on Discord/Reactiflux, if you can go check that. Thanks! |
Are you thinking about the translation in Spanish? May I help with the translation. |
Unfortunately, there isn't multi-lingual support built-in just yet: https://docs.gitbook.com/v2-changes/important-differences#multi-language-books |
Ohh, that's disappointing... Maybe with markdown we could make the docs on Spanish :( |
Okay, just merged in the new "Getting Started" page at #1017 . Looks great! Erm. Except... I just fixed up the Gitbook integration, and it looks like the "Expand Code" stuff doesn't work right: https://redux.gitbook.io/react-redux/docs/gettingstarted . Guess we'll have to figure out another way to handle that. (I do plan on trying to get the |
Thank you @markerikson ! |
Yeah, let's delete the hidden code blocks for now. Other than that, don't worry too much about the Gitbook formatting - I'll need to figure out how to fiddle with the setup appropriately (probably by adding a Per discussion in chat, let's try to put together a practical "Using React-Redux" section next, like:
This would be a good place to at least start talking about selectors, including perhaps a separate sub-page on why and how to use selectors (at least at a basic level). After that, I think we're looking at:
|
Some good thoughts on the need for different types/sections of documentation (tutorials, how-tos, explanations, and references): |
For the "dispatching actions" page, Dan already has a good writeup on SO that we can base it on: https://stackoverflow.com/questions/34458261/how-to-get-simple-dispatch-from-this-props-using-connect-w-redux/34458710#34458710 |
And, Dave Ceddia just posted an excellent You Might Not Need |
We now have the React-Redux docs being published at https://react-redux.js.org ! Built with Docusaurus, hosted on Netlify, and we've got deploy previews turned on for PRs. I'm very excited about this! |
Docs on how to test components using the |
Repeating myself, I really want a "Static Types" docs page. It should definitely cover use with TS, and also Flow if possible. I specifically want it to cover using the DefinitelyTyped/DefinitelyTyped#37300 https://gist.github.com/christianchown/05e084c78ec216070a5a2b80f0534d4b https://dev.to/voronar/practical-typescript-react--redux-4enh |
I'm kinda interested in taking a swing at this. What other things would you want to be covered? My initial thoughts:
Should selectors be part of it even though reselect is it's own package? |
@JNaftali : great, thanks! Yeah, I think the primary points would be around correctly typing I don't think we need to cover the store here, unless there's some very specific aspects with code splitting that really relate to React-Redux specifically. |
Sounds good. I'll see about getting a rough draft done ASAP so you (or anyone else) can give feedback |
Oh, one more thing. You say you want the page to be "Static Types": does that include Flow? My background is all Typescript but I imagine their usage is similar enough that I could figure it out? |
Let's start with TypeScript for now, as that's more widely used. I know @wgao19 uses Flow, and she'd previously worked on a Flow-related page that I don't think we ever merged in. She might be able to adapt some of that material for this page. |
Yah @markerikson I do have an open PR for this. Anything we shall add / edit to shape that up for what you have in mind about this section? |
Mmm... I'd have to go back and review what you'd written before. I think my general observation was that the existing PR seems a bit too specific to "migrating past 0.85" or something, vs just "this is the right way to declare types for |
Yes sure, will submit a revision soon. |
Hi guys, the documentation is very hard to learn for beginners. I just get started to read the doc and I facing difficulty to understand it. The |
@renjithspace : I'm not sure what problems you're trying to describe there. What do you mean by "Get started and tutorial look the same as the API reference"? |
@markerikson I mean even on the introductory part of the documentation trying to explain about the concept of the API. It’s like written the documentation from API perspective, not from the users (developers) perspective. It’s just my feedback that I felt when I started to read the documentation. I think the same is happening to the beginners like me. Here is a tweet regarding the same https://twitter.com/dan_abramov/status/1039570011986321408?s=20 if I didn’t misunderstand what he was meant. Thanks |
Hey @markerikson |
You can start by reading the Contributing guidelines. I would recommend trying to focus on an open issue and have specific questions. |
## What does this PR do? Regarding reduxjs#1001, a few follow up fixes on the `mapState` piece. ## Summary of the changes - Site header: - Remove "Troubleshooting" - Uppercase "API" - Add "Using React-Redux" and let it direct to the `mapState` doc - Site sidebar: - Uppercase "API" - Add a dash to "React-Redux" - Site footer: - Add "Using React-Redux" - Align all link labels with section names on the sidebar - Doc changes - `<ConnectedTodo>` typo - Changed a wording at the table for consistency - Add "./using-react-redux" directory and move in mapState.md - Add `array.slice` to the list of options that create new references
The current React-Redux docs aren't very helpful, for a lot of reasons:
connect
and ways that you can use itWe do also have the "Using React with Redux" page over in the main Redux docs, which is a bit more of a "getting started" page, but it's also not great.
So, I would really like to completely rewrite our React-Redux docs from scratch.
As a rough outline, what I'd like to see is:
<Provider>
and do a basic call toconnect()
<Provider>
makes the store accessible, and roughly whatconnect
does internally to subscribe and extract data)I do already have a Gitbook setup configured for this, same as the main Redux docs. I should be able to get the
react-redux.js.org
domain name for this.We can use some of the info from my Redux Fundamentals Workshop slides at https://blog.isquaredsoftware.com/2018/06/redux-fundamentals-workshop-slides/ to help fill this out.
There's a related Redux docs issue for revamping the Redux portion of the docs at reduxjs/redux#2591 as well.
update
Let's track the outline and progress here:
mapState
mapDispatch
The text was updated successfully, but these errors were encountered: