bug fix with onmount and AsyncStorage with history state

This commit is contained in:
moist-webDev 2023-05-22 01:02:53 -04:00
parent 37212a8921
commit de8fb3d13d
13 changed files with 8057 additions and 79 deletions

4
App.tsx Normal file → Executable file
View File

@ -37,7 +37,9 @@ export default function App() {
const grabPersistence = async () =>{ const grabPersistence = async () =>{
const persistentData:any = await AsyncStorage.getItem('history') const persistentData:any = await AsyncStorage.getItem('history')
setHistory(JSON.parse(persistentData)) if (persistentData){
setHistory(JSON.parse(persistentData))
}
} }
useEffect(()=>{calcResale(cost,percent)},[cost,percent]) useEffect(()=>{calcResale(cost,percent)},[cost,percent])

0
README.md Normal file → Executable file
View File

0
app.json Normal file → Executable file
View File

0
assets/adaptive-icon.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

0
assets/favicon.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

0
assets/icon.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 22 KiB

0
assets/splash.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 46 KiB

After

Width:  |  Height:  |  Size: 46 KiB

0
babel.config.js Normal file → Executable file
View File

0
eas.json Normal file → Executable file
View File

6
package.json Normal file → Executable file
View File

@ -9,8 +9,11 @@
"web": "expo start --web" "web": "expo start --web"
}, },
"dependencies": { "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": "~48.0.15",
"expo-doctor": "1.0.6",
"expo-status-bar": "~1.4.4", "expo-status-bar": "~1.4.4",
"react": "18.2.0", "react": "18.2.0",
"react-native": "0.71.8", "react-native": "0.71.8",
@ -21,6 +24,7 @@
"devDependencies": { "devDependencies": {
"@babel/core": "^7.20.0", "@babel/core": "^7.20.0",
"@types/react": "~18.0.14", "@types/react": "~18.0.14",
"@types/react-native": "^0.72.0",
"typescript": "^4.9.4" "typescript": "^4.9.4"
}, },
"private": true "private": true

0
tsconfig.json Normal file → Executable file
View File

6983
yarn-error.log Executable file

File diff suppressed because it is too large Load Diff

1143
yarn.lock Normal file → Executable file

File diff suppressed because it is too large Load Diff