1 | import { setRecoveryPropsToSave } from './ErroRecoveryStore';
|
2 | import ExpoErrorRecovery from './ExpoErrorRecovery';
|
3 | import './ErrorRecovery.fx';
|
4 |
|
5 | export const recoveredProps = _getRecoveredProps();
|
6 |
|
7 | export type ErrorRecoveryProps = Record<string, any>;
|
8 |
|
9 | export function setRecoveryProps(props: ErrorRecoveryProps): void {
|
10 | setRecoveryPropsToSave(props);
|
11 | }
|
12 |
|
13 | function _getRecoveredProps(): ErrorRecoveryProps | null {
|
14 | if (ExpoErrorRecovery.recoveredProps) {
|
15 | return JSON.parse(ExpoErrorRecovery.recoveredProps);
|
16 | }
|
17 | return null;
|
18 | }
|