MCPcopy Create free account
hub / github.com/dabbott/react-native-express / setItem

Function setItem

examples/files/app/useAsyncStorage.js:13–22  ·  view source on GitHub ↗
(newItem)

Source from the content-addressed store, hash-verified

11 }
12
13 async function setItem(newItem) {
14 try {
15 if (newItem === null) {
16 await AsyncStorage.removeItem(key)
17 } else {
18 await AsyncStorage.setItem(key, newItem)
19 setItem(newItem)
20 }
21 } catch (e) {}
22 }
23
24 useEffect(() => {
25 getValue()

Callers 1

getValueFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected