import { StatusBar } from 'expo-status-bar'; import React, { useEffect } from 'react'; import { StyleSheet, Text, View, TextInput } from 'react-native'; import DepensesList from './components/depenses_list'; import TitleBar from './components/title_bar'; // https://github.com/expo/examples/blob/master/with-sqlite/App.js import * as SQLite from 'expo-sqlite'; const db = SQLite.openDatabase("datacoucou.db"); export default function App() { const [durationMode, onChangeDuration] = React.useState("days"); const [dailyObjective, onChangeObjective] = React.useState(15); useEffect( () => { db.transaction((tx) => { tx.executeSql( ` create table if not exists expense (id integer primary key not null, value real, description text, date integer); create table if not exists objective(value integer); ` ); }); }, []) return ( ); } const styles = StyleSheet.create({ container: { flex: 1, backgroundColor: '#fff', alignItems: 'center', justifyContent: 'center', } });