()
| 74 | |
| 75 | React.useEffect(() => { |
| 76 | const restoreState = async () => { |
| 77 | try { |
| 78 | const savedStateString = await AsyncStorage.getItem(PERSISTENCE_KEY); |
| 79 | const state = JSON.parse(savedStateString || ''); |
| 80 | |
| 81 | setInitialState(state); |
| 82 | } catch (e) { |
| 83 | // ignore error |
| 84 | } finally { |
| 85 | setIsReady(true); |
| 86 | } |
| 87 | }; |
| 88 | |
| 89 | if (!isReady) { |
| 90 | restoreState(); |
no test coverage detected
searching dependent graphs…