修饰器注入
2019-11-11 本文已影响0人
立陶宛_d5a9
import React, { Component } from "react";
import { View, Text } from "react-native";
//@ts-ignore
function test(Tag){
//@ts-ignore
var Tag()
}
}
return ()=><App2/>
}
//@ts-ignore
@test
class App extends Component {
componentWillMount() {
alert('原生周期')
}
scrollView: any;
currIndex: number;
timer: any;
state = {
hide: true
};
render() {
return (
<View>
<Text>原始页面</Text>
</View>
);
}
}
export default App;