UNPKG

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