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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@tuya-oh/react-native-deprecated-custom-components

v0.1.2-0.0.4

Published

Deprecated custom components that originally shipped with React Native

Readme

模板版本:v0.2.2

[!TIP] Github 地址

安装与使用

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

npm

npm install @tuya-oh/react-native-deprecated-custom-components

yarn

yarn add @tuya-oh/react-native-deprecated-custom-components

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

[!WARNING] 使用时 import 的库名不变。

import React, { useState, useRef } from 'react';
import { View, Text, Button, StyleSheet, ScrollView, TouchableHighlight } from 'react-native';
import { Navigator } from 'react-native-deprecated-custom-components';

export function NavigatorDemo() {

  const routes = [
    { title: 'First Scene', index: 0 },
    { title: 'Second Scene', index: 1 },
    { title: 'Third Scene', index: 2 },
  ];

  return (
    <ScrollView style={{ height: '100%', marginBottom: 20 }} >
          <Navigator
            style={styles.container}
            initialRoute={routes[0]}
            initialRouteStack={routes}
            renderScene={(route, navigator) =>
              <TouchableHighlight onPress={() => {
                if (route.index === 0) {
                  navigator.push(routes[1]);
                } else if (route.index === 1) {
                  navigator.push(routes[2]);
                } else {
                  navigator.pop()
                }
              }}>
                <View>
                  <Text>当前页面:{route.title}</Text>
                </View>
              </TouchableHighlight>
            }
          />
    </ScrollView>
  );
};

const styles = StyleSheet.create({
  container: {
    width: '100%',
    height: 100,
    flex: 1,
  },
  scene: {
    flex: 1,
    justifyContent: 'center',
    alignItems: 'center',
    padding: 20,
  },
  title: {
    fontSize: 24,
    marginBottom: 20,
  },
});

约束与限制

兼容性

在以下版本验证通过

  1. RNOH:0.72.28; SDK:5.0.2.126 ; IDE:DevEco Studio 5.0.7.210; ROM:5.0.0.123;

属性

| Name | Description | Type | Required | Platform | HarmonyOS Support | | ------------------- | --------------------------------------------------------- | ---------- | -------- | -------- | ----------------- | | initialRoute | 设置初始路由 | Object | 是(yes) | All | 是(yes) | | renderScene | 根据路由渲染对应组件 | Function | 是(yes) | All | 是(yes) | | configureScene | 用于配置场景的过渡动画和手势 | Function | 否(no) | All | 是(yes) | | navigationBar | 用于自定义全局导航栏的样式和交互逻辑 | Node | 否(no) | All | 是(yes) | | initialRouteStack | 用于初始化导航器的路由堆栈 的关键属性 | Array | 否(no) | All | 是(yes) | | onWillFocus | 用于监听页面即将获得焦点(即页面即将被展示)的事件 | Function | 否(no) | All | 是(yes) | | onDidFocus | 用于监听页面已经完成过渡并完全获得焦点的事件 | Function | 否(no) | All | 是(yes) | | navigator | 可选地从父级navigator传入导航器对象,提供(push/pop)等方法 | Object | 否(no) | All | 是(yes) | | sceneStyle | 应用于每个场景容器的样式 | Style | 否(no) | All | 是(yes) |

遗留问题

其他

开源协议

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