import React, { Component } from 'react' import { View, Text, Button, TextInput, FlatList } from 'react-native' console.log('first hi') import * as styles from './styles' import Datastore from 'react-native-local-mongodb' const db = new Datastore({ filename: 'asyncStorageKey', autoload: true }) export default class drip extends Component { constructor(props) { super(props) this.state = { temperatures: [] } console.log('hello') db.find({ key: { $exists: true } }, (err, persistedTemperatures) => { if (err) throw err this.setState({ temperatures: [...persistedTemperatures, ...this.state.temperatures] }) }) } render() { return ( { this.setState({currentValue: val}) }} />