I started seeing 2 warnings repeat when starting the player today. I’m currently using "@amzn/react-native-kepler": "~2.0.0", and looking trough the documentation I for KeplerAppState and useComponentInstance I seem to be following the documented pattern. Also when searching the module I don’t see addAppStateListener or getComponentInstance. Is there any clarification for these warnings?
useAddKeplerAppStateListenerCallback is deprecated. Update to use addAppStateListener from KeplerAppStateManager instead. useAddKeplerAppStateListenerCallback will be removed in a future release
and
useComponentInstance is deprecated. Update to use getComponentInstance from KeplerAppStateManager instead. useComponentInstance will be removed in a future release
That’s the issue I don’t see KeplerAppStateManager available from @amzn/react-native-kepler is there a newer versions I should be on which supports that?
SO frustrating. What we are supposed to switch to to avoid the deprecation needs to be available when the deprecation is announced so we can switch. I’ll never remember to check for availability of the getComponentInstance() call at the same time the useComponentInstance() is deprecated. I just posted about this in the feature request section if they allow it: this is not cool behavior Amazon. “Oh by the way this is being deprecated use someCall() instead.” But someCall() is not available. !!!
Hey team. @Amz_Rsk
Any updates ? Do we have another way to avoid this problem?
Tried:
useKeplerAppStateManager instead of useAddKeplerAppStateListenerCallback
But faced with same error:
(NOBRIDGE) ERROR TypeError: KeplerAppStateManagerSpec_1.default.addEventListener is not a function (it is undefined)
This error is located at:
in ApplicationState (created by App)
in Unknown (created by App)
in RCTView (created by View)
in View
in Unknown
in Unknown (created by App)
in LocalizeProvider (created by TranslationProvider)
in TranslationProvider (created by App)
in ApolloProvider (created by SlingStoreProvider)
in SlingStoreProvider (created by App)
in PersistGate (created by SlingStoreProvider)
in Provider (created by SlingStoreProvider)
in SlingStoreProvider (created by App)
in App
in RCTView (created by View)
in View (created by AppContainer)
in RCTView (created by View)
in View (created by AppContainer)
in AppContainer
in com.sling.main(RootComponent), js engine: hermes
Seeing the same issue, here, trying to implement useKeplerAppStateManager using the documentation, and even the exact comprehensive example app from the documentation, and getting
‘“@amznamzn/react-native-kepler”’ has no exported member named ‘useKeplerAppStateManager’