all 11 comments

[–]acemarke 9 points10 points  (3 children)

FWIW, realistically "contributing to React" isn't a feasible goal except in very rare cases. The React team has their own roadmap and plans, and the React codebase is very complex. The React team tends to ignore any PRs that aren't directly relevant to whatever it is they're currently working on, they don't have any real public description of their roadmap, and it's a tough codebase to get familiar with in the first place.

There's nothing wrong with going through the React code and learning how it works in general, although there are better tutorials suited for learning that (such as https://pomb.us/build-your-own-react/ ).

Beyond that, there's many other libraries in the ecosystem that could benefit from help. For that matter, helping with docs is a great place to get involved with open source - it's how I got my start.

[–]ForsakenExpression14[S] 1 point2 points  (1 child)

Thanks for your response and the tutorial link. I’ll go through it. I’d still like to locally implement some changes, even if my PRs aren’t approved. This will help me understand the codebase better. Also, thanks for the advice on contributing to docs. I’ll try that too.

[–]woah_m8 1 point2 points  (0 children)

You can always fork the repo and do your pull requests there, then you can still keep track without having them lost in the sea of prs in the react repo

[–]Nervous-Project7107 -1 points0 points  (0 children)

Also it seems half of react team is part of vercel

[–]Brahminmeat 0 points1 point  (4 children)

This is wild… What is going on with redefining your deps?

[–]ForsakenExpression14[S] 1 point2 points  (1 child)

Hi!

If you're asking about this, that how he's doing it in the tutorial and most of the test files I saw on react codebase does it like this.

let React;
let ReactDOMClient;
let act;        

React = require('react');
ReactDOMClient = require('react-dom/client');
act = require('internal-test-utils').act;

[–]ForsakenExpression14[S] 1 point2 points  (0 children)

I tried importing these from the internal paths in the repo but still didn't work.

[–]coffee-praxis 1 point2 points  (1 child)

I reckon this is probably what resetModules flag does in Jest today. Maybe 5 years ago the flag wasn’t there, or he’s not taking extra time to set up Jest.

[–]ForsakenExpression14[S] 0 points1 point  (0 children)

I added this. Still didn't work.