-
Notifications
You must be signed in to change notification settings - Fork 47.6k
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
[New Docs] Wanted Guides #8060
Comments
I'll take the glossary sections. Is there a list of terms somewhere I can work of off? Or should I come up with some? I don't remember what the virtual DOM terminology page contained. |
I can possibly take routing with HTML5 history |
Regarding terminology, please assume familiarity with all topics in "Basic Guides". Most of them have relevant terms right in titles (elements, components, props, state, lifecycle, events, keys). |
Does the routing guide even need to use |
If we do plain props we'll have to make top level render inside a change handler right? I'd like to avoid that because people often don't understand how to compose two such handlers. I think we should teach HTML5 routing right away. Like here: https://vuejs.org/guide/routing.html. Would you really need context? You can have Link listen to history independently. |
Actually, it shouldn't need context if we're just using plain HTML5 history. I was thinking of using the history package. |
I want to keep it package free so people see the simplicity of doing routing with React, and then go to packages when they actually need their features. |
Yes, that is the definitely ideal. Was a thinking mistake on my part. So just to confirm, the idea is to add a listener in |
Maybe not even call it Router, just make a top level App component choose the right thing based on state and a URL => component map object or something like that. |
Ok. Will put a draft together probably this weekend :) |
I'm writing a guide on ajax. Is that good with people or is someone already on it? |
Is anyone working on |
@madhug Assigned to you, thanks! |
@gaearon I've started putting the routing guide together, but the HTML5 History API is a little less nice than I had imagined. First, browser's don't emit the While I have no problem with explaining these things, it would end up being a guide to HTML5 History instead of a guide to React Routing. Would it be ok to use the Also should I create a separate issue for this? |
OK, using |
Is anyone working on |
@gaearon should this also include a section for code splitting? Happy to help with that. |
So what are the current thoughts on a "Learning Resources" section? Per the list, @tylermcginnis proposed one over in #7117 , and that was closed due to the docs rewrite. I know I've seen a lot of people complain that the React docs don't tell you how to build a full-blown app. I agree that the core of the docs should focus on React itself, especially given the variety of ways that people use React, but at a minimum a pointer to additional resources would be good. I'm very biased, but my React/Redux links list actually covers several of the topics listed here. For example, it has sections discussing use of `children, rendering modals, wrapping non-React code like jQuery plugins, making AJAX calls, performance and optimization, and much much more. Also, per my comment earlier: I put together a "best-of / guided learning" version of my links list for the new Reactiflux site at https://www.reactiflux.com/learning/ , and later updated the front page of my list to show that. So, while it wouldn't be bad to have some of those topics directly in the docs, there's enough good quality articles out there already that I think the docs could simply point to a couple selected articles on each of these topics, and then maybe point to my list and Tim Arney's React FAQ as sources for further information. |
@gaearon Is it still open for contribution? |
@pinakdas163 I think a "troubleshooting" doc is often not a good idea when the topic is very broad like "everything about React". It's very hard for the core team to keep it up to date, since there's no good way of detecting when particular troubles are later resolved. And it's also hard for people to find, since you rarely are debugging your troubles by searching for a "troubleshooting" doc on the React website. Instead, when there are common issues that lead to people finding a bug and then fixing it, people are more likely to look somewhere like Stack Overflow, or to search and find a heavily-SEO'd site like Stack Overflow. So my suggestion would be when you run into troubleshooting-type troubles, to try to put them in Stack Overflow rather than into the React docs. If there were a more specific troubleshooting section like "troubleshooting when using web components" then it might be very useful to put that in existing guide pages. |
I don’t know.. In my experience Troubleshooting doc (at least in Redux) was incredibly helpful in fixing 50% of most commonly asked questions. I think it would be a huge win to have it in React even if it documents just:
|
OK, those sound like a pretty interesting list of things to read through linearly actually. |
This is also a good candidate for Troubleshooting. Basically, "why doesn't my state update" often comes from data derived in the wrong place (especially from props). This used to be in the old docs but we yanked it. |
Perhaps, animation in general? This is a broad topic, and many parts are very hard to implement with React (at a first glance). Some of the problems I've run into: Due to reconciliation, it's hard/impossible/very-hard-to-control to:
There are undoubtedly others. Re-parenting is quite often mentioned on twitter. Just to give a quick example. I'll keep components stateless for clarity of code. // app.jsx
let observableState = 'login'
const LoginForm = () => {
return <form>
<label>Login</label> <input name="login" />
<label>Password</label> <input name="password" />
<button onClick={login}>Login</button>
<button onClick={() => observableState = 'signup' }>Sign Up</button>
</form>
}
const RegisterForm = () => {
return <form>
<label>Login</label> <input name="login" />
<label>Password</label> <input name="password" />
<label>Access code</label> <input name="code" />
<button onClick={signup}>Sign Up</button>
<button onClick={() => observableState = 'login' }>Login</button>
</form>
}
const App = () => {
if(observableState === 'login') {
return <LoginForm />
} else if(observableState === 'signup') {
return <Signup />
}
}
React.render(<App />, ...) When switching between forms, React will only:
So, there are quite a few questions about animating all this:
If anyone figured this stuff out, it would be a great service to the community to describe how to deal with these and other situations in React (an to a larger community as a whole, because this same problem exists in all similar frameworks: snabbdom, virtual-dom, inferno ... ) |
This might generate some backlash from the community. The name
UPD: Editing this issue to add more context and to bring it in line with my comments on the documentation review
|
Is anyone assigned Snapshot testing yet? I think it's a crucial guide to help take new React devs from "Hello World" React and into production, I'd love to take that doc if no one is on it yet. After looking at #7431, my outline is:
Am I missing anything? |
I could also contribute to a section on Accessibility. Is anyone busy with this already? Are there any plans yet? On that topic, the docs site itself has some accessibility issues that could be corrected easily. For a start, I have submitted #9431 |
What's still open? |
@thamaranth : based on the activity I've seen, probably anything in the first comment that's not checked off and doesn't have a name next to it. |
I can help out with good resources if it's still open. |
Hi @gaearon: is there anything remaining, which I can pick up? |
I'd love to contribute. |
@dance2die : I don't think anyone will "assign" you something - go ahead and pick something that looks good and go for it! That said, this issue really should be migrated to the new docs site repo at https://github.com/reactjs/reactjs.org . |
Migrated to reactjs/react.dev/issues/83 If you're interested in picking up any of these guides, let's talk on the new issue and I'll make them in-progress for you! |
We revamped the docs, but there are a few guides that are missing and that I think are essential.
cloneElement
andChildren
React.cloneElement docs are a bit light #6942)setState
with HTML5 history API and point to RR as a component-based API for it once v4 is out)fetch()
in lifecycles, mention cancellation issues)react-test-renderer
#7431)If somebody wants to work on this please comment here and let's figure out a plan.
Help wanted!
The text was updated successfully, but these errors were encountered: