javascript [ss]你好#react native

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了javascript [ss]你好#react native相关的知识,希望对你有一定的参考价值。

// @flow
'use strict';

import React, {Component} from 'react';
import {StyleSheet, View} from 'react-native';
import {connect} from 'react-redux';

type Props = {
    dispatch: (action: any) => void,
    navigation: any,
};

class $TemplatePage$ extends Component<Props> {
    static navigationOptions = ({ navigation, screenProps, navigationOptions }) => {
        const params = navigation.state.params || {};
        return {
            // set header title text
            // title: 'Home'

            // set to null when no header
            // header: null, 

            // applied to the View that wraps the header
            // headerStyle: {
            //     elevation: 0,
            //     marginTop: 24,
            //     backgroundColor: '#ffffff',
            // },

            // the back button and title both use this property as their color
            // headerTintColor: '#fff',

            //  Text style properties for the title
            // headerTitleStyle: {
            //     fontWeight: 'bold',
            // },

            // Not only change text style of the title, use custom view instead of Text as title
            // headerTitle: <LogoTitle />,

            // header right element
            // headerRight: <Button/>
        };
    };

    _navListener: any;

    componentDidMount() {
        this._navListener = this.props.navigation.addListener('didFocus', this._onScreenFocus);
        this.props.navigation.setParams({ onHeaderRightButtonPress: this._onHeaderRightButtonPress });
    }

    componentWillUnmount() {
        this._navListener.remove();
    }

    _onHeaderRightButtonPress = () => {
    };

    _onScreenFocus = () => {
    };

    _onScreenLostFocus = () => {
    };

    render() {
        return (
            <View style={styles.container}>
            </View>
        );
    }
}

const styles = StyleSheet.create({
    container: {
        flex: 1,
        paddingTop: 5,
        backgroundColor: 'rgba(255, 255, 255, 1)',
    },
});


export default connect()($TemplatePage$);

以上是关于javascript [ss]你好#react native的主要内容,如果未能解决你的问题,请参考以下文章

使用 JavaScript 将秒转换为 HH-MM-SS?

SS 在 React 组件声明中代表啥?

React和i18n-通过在URL中添加语言环境进行翻译

使用 React / JSX 生成非 JavaScript 代码

javascript 使用javascript将两次值HH:mm:ss相加

在Javascript / React中将对象转换为数组