File tree 1 file changed +15
-2
lines changed
1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change 22
22
* just use index.ts
23
23
*/
24
24
25
- import { AsyncStorage } from 'react-native' ;
25
+ import * as ReactNative from 'react-native' ;
26
26
27
27
import { FirebaseApp , getApp , _getProvider } from '@firebase/app' ;
28
28
import { Auth , Persistence } from './src/model/public_types' ;
@@ -57,7 +57,20 @@ export { PhoneMultiFactorGenerator } from './src/platform_browser/mfa/assertions
57
57
* @public
58
58
*/
59
59
export const reactNativeLocalPersistence : Persistence =
60
- getReactNativePersistence ( AsyncStorage ) ;
60
+ getReactNativePersistence ( {
61
+ getItem ( ...args ) {
62
+ // Called inline to avoid deprecation warnings on startup.
63
+ return ReactNative . AsyncStorage . getItem ( ...args ) ;
64
+ } ,
65
+ setItem ( ...args ) {
66
+ // Called inline to avoid deprecation warnings on startup.
67
+ return ReactNative . AsyncStorage . setItem ( ...args ) ;
68
+ } ,
69
+ removeItem ( ...args ) {
70
+ // Called inline to avoid deprecation warnings on startup.
71
+ return ReactNative . AsyncStorage . removeItem ( ...args ) ;
72
+ } ,
73
+ } ) ;
61
74
62
75
export { getReactNativePersistence } ;
63
76
You can’t perform that action at this time.
0 commit comments