React Native之处理文本输入

import React, {Component} from 'react';
import {
    AppRegistry, Image, View, Text, TextInput
} from 'react-native';

export default class HelloWorld extends Component {
    constructor(props) {
        super(props);
        this.state = {text: ''};
    }
    render() {

        return (

            

                 this.setState({text})}>
                

                
                    {this.state.text.split(' ').map((word) => word && '@').join(' ')}
                

            

        );
    }
}


AppRegistry.registerComponent('HelloWorld', () => HelloWorld);

 

 

 

你可能感兴趣的:(React,Native,入门与实战)