npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@tuya-oh/react-native-qrcode-svg

v6.2.0-rc-0.0.3

Published

A QR Code generator for React Native based on react-native-svg and javascript-qrcode.

Readme

模板版本:v0.2.2

[!TIP] Github 地址

安装与使用

进入到工程目录并输入以下命令:

npm

npm install @tuya-oh/react-native-qrcode-svg

yarn

yarn add @tuya-oh/react-native-qrcode-svg

下面的代码展示了这个库的基本使用场景:

[!WARNING] 使用时 import 的库名不变。 [!TIP] 当报错信息为Property 'TextEncoder' doesn't exist解决方案

import {  Text, View } from "react-native";
import QRCode from 'react-native-qrcode-svg';

export const SvgDemo = () => {
    return (
        <View style={{ flex: 1, backgroundColor: '#FFFFFF' }}>
            <QRCode
                size={300}
              
                value="http://awesome.link.qr"
            />
        </View>
    )
}

Link

本库 HarmonyOS 侧实现依赖@react-native-oh-tpl/react-native-svg 的原生端代码,如已在 HarmonyOS 工程中引入过该库,则无需再次引入,可跳过本章节步骤,直接使用。

如未引入请参照@react-native-oh-tpl/react-native-svg-capi 文档的 Link 章节进行引入

约束与限制

兼容性

在以下版本验证通过

1.RNOH:0.72.27; SDK:HarmonyOS-Next-DB1 5.0.0.29(SP1); IDE:DevEco Studio 5.0.3.400; ROM:3.0.0.25;

属性

[!TIP] "Platform"列表示该属性在原三方库上支持的平台。

[!TIP] "HarmonyOS Support"列为 yes 表示 HarmonyOS 平台支持该属性;no 则表示不支持;partially 表示部分支持。使用方法跨平台一致,效果对标 iOS 或 Android 的效果。

| Name | Description | Type | Required | Platform | HarmonyOS Support | | ---------------------- | ------------------------------------------------------------------------------------------------------------------------- | -------- | -------- | -------- | ----------------- | | size | 二维码尺寸大小 | number | No | iOS,Android | yes | | value | 二维码的字符串值 | string | yes | iOS,Android | yes | | color | 二维码颜色 | string | No | iOS,Android | yes | | backgroundColor | 二维码背景色 | string | No | iOS,Android | yes | | enableLinearGradient | 是否启用二维码背景色渐变 | boolean | No | iOS,Android | yes | | linearGradient | 二维码背景色渐变值 | string[] | No | iOS,Android | yes | | gradientDirection | 线性渐变方向 | string | No | iOS,Android | yes | | logo | 二维码中的logo | object | No | iOS,Android | yes | | logoSize | logo的尺寸大小 | number | No | iOS,Android | yes | | logoBackgroundColor | logo框的背景色 | string | No | iOS,Android | yes | | logoMargin | logo和logo框的外边距 | number | No | iOS,Android | yes | | logoBorderRadius | logo的圆角尺寸 | number | No | iOS | yes | | quietZone | 二维码的内边距 | number | No | iOS,Android | yes | | getRef | 获取二维码对象以手动调用 | callback | No | iOS,Android | yes | | ecl | 二维码的纠错级别 | string | No | iOS,Android | yes | | onError(error) | 二维码渲染报错的回调 | callback | No | iOS,Android | yes |

遗留问题

其他

开源协议

本项目基于 The MIT License (MIT) ,请自由地享受和参与开源。