bug fix with onmount and AsyncStorage with history state
|
|
@ -37,7 +37,9 @@ export default function App() {
|
|||
|
||||
const grabPersistence = async () =>{
|
||||
const persistentData:any = await AsyncStorage.getItem('history')
|
||||
setHistory(JSON.parse(persistentData))
|
||||
if (persistentData){
|
||||
setHistory(JSON.parse(persistentData))
|
||||
}
|
||||
}
|
||||
|
||||
useEffect(()=>{calcResale(cost,percent)},[cost,percent])
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 46 KiB After Width: | Height: | Size: 46 KiB |
|
|
@ -9,8 +9,11 @@
|
|||
"web": "expo start --web"
|
||||
},
|
||||
"dependencies": {
|
||||
"@react-native-async-storage/async-storage": "^1.18.1",
|
||||
"@expo/config-plugins": "~6.0.0",
|
||||
"@react-native-async-storage/async-storage": "1.17.11",
|
||||
"eas-cli": "^3.13.0",
|
||||
"expo": "~48.0.15",
|
||||
"expo-doctor": "1.0.6",
|
||||
"expo-status-bar": "~1.4.4",
|
||||
"react": "18.2.0",
|
||||
"react-native": "0.71.8",
|
||||
|
|
@ -21,6 +24,7 @@
|
|||
"devDependencies": {
|
||||
"@babel/core": "^7.20.0",
|
||||
"@types/react": "~18.0.14",
|
||||
"@types/react-native": "^0.72.0",
|
||||
"typescript": "^4.9.4"
|
||||
},
|
||||
"private": true
|
||||
|
|
|
|||