Add slider and save value in LocalStorage

This commit is contained in:
Julia Friesel
2018-08-21 14:26:54 +02:00
parent 7a1ef388d3
commit c6b490b2a4
6 changed files with 116 additions and 14 deletions
+11
View File
@@ -0,0 +1,11 @@
import { AsyncStorage } from 'react-native'
export async function getTempScale() {
const result = await AsyncStorage.getItem('tempScale')
if (!result) return result
return JSON.parse(result)
}
export async function saveTempScale(scale) {
return AsyncStorage.setItem('tempScale', JSON.stringify(scale))
}