4.RN将数据存储到本地19-11-19

对input中的值进行储存,获取,删除操作

import React, { Component } from "react";
import {
  View,
  Image,
  TouchableOpacity,
  Button,
  Text,
  AsyncStorage,
  TextInput,
} from "react-native";

const KEY="save_key";
class AsyncStoragePage extends Component {
  constructor(props){
    super(props);
    this.state={
      showText:''
    }
  }
  render() {
    const userStore = this.props["domain.user"];
    const navigation = this.props.navigation;
    return (
      
        {this.state.showText}
        {
          this.loadData();
        }}/>

         {
             this.value=text;
           }}
        />
        
          

你可能感兴趣的:(4.RN将数据存储到本地19-11-19)