https://github.com/rxreactnative/react-native-test-rxstick
React-Native Test JavaScript
https://github.com/rxreactnative/react-native-test-rxstick
react-native
Last synced: about 2 months ago
JSON representation
React-Native Test JavaScript
- Host: GitHub
- URL: https://github.com/rxreactnative/react-native-test-rxstick
- Owner: RXReactNative
- License: mit
- Created: 2019-12-31T09:59:37.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-11-17T05:04:38.000Z (over 2 years ago)
- Last Synced: 2025-03-04T06:19:36.746Z (over 1 year ago)
- Topics: react-native
- Language: JavaScript
- Homepage:
- Size: 82 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# rxstick
小按钮 测试 用于测试
----
这个只是框架(也可以说是 入口),具体页面,以及功能需要自己定义。
simple test framework
## Installation
Open a Terminal in the project root and run:
```sh
yarn add react-native-test-rxstick -dev
```
or if you use npm:
```sh
npm install react-native-test-rxstick --save-dev
```


## Usage
```js
import React from 'react';
import Stick, { RXTheme, RXRoot } from '../react-native-test-rxstick'
//第一种
import TestTheme from './xx/xx'
import TestRoot from './xx/xx'
export default class TestStick extends Stick {
constructor(props) {
super(props);
}
static allowAccess() {
return true;
}
static setTheme() {
// const TestTheme = require('./TestTheme').default; //第二种
RXTheme.update(TestTheme);
}
static setRoot() {
// const TestRoot = require('./TestRoot').default; //第二种
RXRoot.replaceComponent()
}
}
```
TestTheme (stick style)
```js
export default {
stickBackgroundColor: '#FFF68F',
stickColor: '#00FFFF',
stickFontSize: 18,
}
```
TestRoot
```js
// Component
```
---
### My approach:
1. Configure react native bundle packaging
2. Replace the stick entry file before packaging, debug / release
Disadvantage: not debuggable
### 我的处理方法:
1. 配置react-native bundle打包
2. 在打包前替换stick入口文件,debug/release
坏处:不可调试
---