All contributions are very welcome! Improving documentation, filing issues and discussing feature requests are just as valuable as commiting code. Don't hesitate to get in touch if you have questions.
Make sure you have read and follow the Code of Conduct. It will be enforced.
Since Lightyear is mostly just a fork of React, it is recommended to also read the official How to Contribute guide.
Lightyear is a fork of React. Contributions and issues not relating to the extended functionality itself should be filed in the React repository instead of here.
If you are uncertain of where to post an issue:
- If related to server side Suspense functionality, file an issue here in the Lightyear repository
- If not related to Suspense, try to figure out if it works with the official React renderer and post the issue accordingly
If you make a PR, make sure you target the Lightyear repository and not the official React one!
Because it is a fork, Lightyear does not use master
, instead the lightyear
-branch is the default branch that you should branch out of and target with PRs.
I have added a few scripts to package.json
to make it easier to work with Lightyear specifically:
yarn lightyear:build
- Builds onlyreact-dom/server
(aka Lightyear) todist/node_modules/react-dom
yarn lightyear:test-watch
yarn lightyear:test-watch-branch
- Watch mode for all changes between current branch and thelightyear
branchyarn lightyear:test-changed
yarn lightyear:prettier-check
yarn lightyear:prettier-check-changed
yarn lightyear:validate-changed
- Runs build, linting and tests. Used aspre-push
-hook and if this passes, CI usually does as well.
You can find most Lightyear-specific code at the bottom of ReactPartialRenderer.js.
If you want to know exactly what changes have been made in Lightyear compared to React, it might help to look at a diff between Lightyear and the React master.
Once again, I'm extremely happy to help out and answer any questions, don't hesitate to reach out!