-
Notifications
You must be signed in to change notification settings - Fork 47k
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
Write a contribution guide documenting the design decisions #6335
Comments
Some incoherent notes I made earlier about design philosophy:
|
I've been looking for a good high level overview on how all the React internals work together, so if this could include something like that as well I think it'd be really helpful. |
|
Commonly requested: an explanation of what happens when you call |
Things I have asked myself when trying to understand, and contribute to, the codebase... It's probably a lot, but costs nothing to lay them here :)
|
Everything mentioned looks great! I definitely feel like adding react-specific contributing documentation is a must to help people contribute. I also believe that making things beginner friendly is valuable. There are people who want to contribute and can, but they're not familiar with git or GitHub and may not even know what a Pull Request is. Even though it's technically not the React team's responsibility to teach people these fundamental concepts, I think leading out with some good solid resources that do would be really helpful. This is the main motivation behind #6332 and #6333. Either way, thanks for giving thought to making it easier to contribute to React. This project can be a good example for other projects in the community! |
The overall impression I got while reading the codebase is that if it was not facebook's, I'd have thought it was hard to read, and full of hackish things and inconsistencies... But I know some great engineers have written the codebase :) so there must be valid (or not !) reasons for this, be it historic, performance, architecture opinion, backward compat... It would be great to know more on the general history of this code. I also realized recently that react-native was written in a very different way, more modern, and I'd like to know more about the plans regarding the 2 projects. |
In what ways is React Native more modern? Lots of it builds on top of React so is a little higher-level but otherwise I tend to think the coding styles are similar. |
I find the folder structure much easier to follow for example, and I found it has less inconsistencies, but I'm not too familiar with the react native codebase. |
But it may not make sense to compare them. |
I agree with @jide that internal reliance on mixins (e.g. |
I'd like to contribute to the core of React (or at least understand it), but found it hard to approach. Taking a quick look at it discouraged me and I felt I only had time to contribute on minor fixes, documentation or github issues. I'd like a guide yes! |
@gaearon I think that list would REALLY help (at least me) as it's pretty difficult to jump into a project without some good notes to guide you as I personally cannot take the many hours it takes to read all the code and reason about how the sys works....well at least not yet...I should be taking a vacation here soon maybe then.... 😄 |
@spicyj I don't want to steer too off topic but is it possible to elaborate or link to more thoughts here? |
@nhunzaker #4595 has some related discussion. Nothing decided yet. |
What would be contributed? Does React really need more? |
On one of my projects we had talked about creating a sort of README for contributing (different from contributing guides, which seem to focus more on general things like code conventions and project philosophies), which kind of turned into a walkthrough of the codebase. I've got a PR proposal on the project with a section of what the walkthrough could look like here: eanplatter/enclave#88. Sometimes when you're looking at unfamiliar patterns it's hard to tell vital organs from sinews. I am also the type of person who learns best from macro to micro, so a birds-eye view of the project seemed helpful to me. |
I've just started contributing (2 accepted PRs about tests so far) and the more information there is about the code - the better! Check out Eslint Developer Guide for an example. When I read it I started having a much better understanding of their code. |
Aldo explains how to contribute documentation, how the website is built, how JSX is properly highlighted in code snippets (big struggle for me). I love to contribute documentation but didn't understand how to do it here. |
And how to make sure doc is properly indexed by Algolia and the search bar (great addition by the way!) -- sorry for the double comment, the mobile version of GH doesn't have an edit button. |
We started something here: https://facebook.github.io/react/contributing/design-principles.html I will add more content in the coming days. |
I published some more information. How to Contribute is what we used to have in Codebase Overview documents our conventions and walks you through how the codebase is split and organized. Let me know what you think! |
👍 hacktoberfest is coming... so timing is perfect. Thanks @gaearon. |
Detailed Implementation Notes are up. They detail (in a somewhat simplified way) how the stack reconciler works. I believe this, together with How to Contribute, Codebase Overview, and Design Decisions covers most of the ground here. I likely won't have the time to cover more, but this should give somebody motivated enough information to contribute, e.g. a glossary. |
Historically we haven’t been very good at explaining how to contribute to React.
We have a small guide but it doesn’t offer crucial information about:
providesModule
.invariant
,warning
,__DEV__
, and infra around them.What do you think? I’m especially interested in hearing from people who considered contributing to React but were turned away by the internal complexity.
The text was updated successfully, but these errors were encountered: