This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ... | |
import { Keyboard,TouchableWithoutFeedback, /* ... other component imports */} from 'react-native'; | |
// ... | |
const Home = () => { | |
// ... | |
return ( | |
<TouchableWithoutFeedback onPress={Keyboard.dismiss}> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { registerRootComponent } from 'expo'; | |
import App from './src/App'; | |
registerRootComponent(App); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { useEffect, useState } from 'react'; | |
// ... | |
const Home = () => { | |
const defaultValue = 0; | |
// ... | |
useEffect(() => { | |
const total = parseFloat(bill) || defaultValue; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ... | |
const Home = () => { | |
// ... | |
const handleSplitAdd = () => { | |
setSplit((split) => { | |
const total = parseInt(split) + 1; | |
return total.toString(); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ... | |
const Home = () => { | |
// ... | |
const handleBillChange = (value) => { | |
setBill(value); | |
}; | |
const handleTipChange = (value) => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { useState } from 'react'; | |
// .... | |
const Home = () => { | |
const [bill, setBill] = useState('0.00'); | |
const [tip, setTip] = useState('10'); | |
const [split, setSplit] = useState('2'); | |
const [splitTotal, setSplitTotal] = useState('0.00'); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import Home from './screens/Home'; | |
const App = () => { | |
return <Home />; | |
}; | |
export default App; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import { StyleSheet, View } from 'react-native'; | |
import Input from '../components/Input'; | |
import SplitOutput from '../containers/SplitOutput'; | |
const styles = StyleSheet.create({ | |
container: { | |
flex: 1, | |
paddingTop: 40, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import { StyleSheet, Text, View } from 'react-native'; | |
const styles = StyleSheet.create({ | |
textHeader: { | |
fontSize: 18, | |
color: '#ffffff', | |
fontWeight: '700', | |
letterSpacing: 1.5, | |
}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import { MaterialIcons } from '@expo/vector-icons'; | |
import { StyleSheet, Text, View } from 'react-native'; | |
const styles = StyleSheet.create({ | |
textHeader: { | |
fontSize: 18, | |
color: '#ffffff', | |
fontWeight: '700', |
NewerOlder