Skip to main content
Thank you for your interest in contributing to react-qr-code! This guide will help you get started with development and contributions.

Development Setup

Follow these steps to set up your local development environment:
1

Clone the repository

git clone [email protected]:rosskhanas/react-qr-code.git
cd react-qr-code
2

Install dependencies

npm install
3

Build the library

npm run build
4

Run the demo (optional)

npm run demo
This will start the Expo demo app where you can test your changes.

Testing UTF-8 Locally

To test non-ASCII character support (Korean, Japanese, emoji, etc.):
1

Start watch mode

In one terminal, build the demo library bundle in watch mode:
npm run demo-web-watch
2

Run the demo app

In another terminal, start the demo:
npm run demo
3

Test the QR code

  1. Open the demo in your browser (Expo starts it automatically)
  2. Type a non-ASCII value into the input (e.g., 안녕하세요, こんにちは, or an emoji)
  3. Scan the QR code with a phone camera app
  4. Verify the decoded text matches exactly

Available Scripts

CommandDescription
npm run buildBuild the library for production
npm run demoStart the demo app
npm run demo-web-watchBuild demo library in watch mode
npm run demo:buildBuild the demo for deployment
npm run lintRun linter and auto-fix issues
npm run cleanClean build artifacts

Reporting Issues

If you find a bug or have a feature request:
  1. Check if the issue already exists in the GitHub Issues
  2. If not, create a new issue with:
    • A clear, descriptive title
    • Steps to reproduce (for bugs)
    • Expected vs actual behavior
    • Environment details (React version, platform, etc.)
    • Code samples or screenshots if applicable

Pull Request Guidelines

When submitting a pull request:
1

Fork and create a branch

Fork the repository and create a new branch for your changes:
git checkout -b feature/your-feature-name
2

Make your changes

  • Write clean, maintainable code
  • Follow the existing code style
  • Run npm run lint to check for issues
  • Test your changes thoroughly
3

Commit your changes

Use clear, descriptive commit messages:
git commit -m "feat: add new feature"
# or
git commit -m "fix: resolve rendering issue"
4

Push and create PR

git push origin feature/your-feature-name
Then open a pull request on GitHub with:
  • A clear description of the changes
  • Reference to any related issues
  • Screenshots or examples if applicable

Code Review Process

All contributions go through code review:
  1. A maintainer will review your PR
  2. You may be asked to make changes
  3. Once approved, your PR will be merged
  4. Your contribution will be included in the next release

License

By contributing to react-qr-code, you agree that your contributions will be licensed under the MIT License.
MIT License

Copyright (c) 2017 Ross Khanas
The full license text is available in the repository.

Questions?

If you have questions about contributing:
  • Open a GitHub Discussion
  • Check existing issues and pull requests
  • Reach out to the maintainers
Thank you for contributing to react-qr-code!

Build docs developers (and LLMs) love