2026-08-05 07:35:12 +00:00
// Module ID: 8360
// Function ID: 8361
2026-07-23 10:11:24 +00:00
// Name: useInvalidPreventRemoveError
2026-07-29 08:29:29 +00:00
// Dependencies: [32, 19]
2026-07-23 10:11:24 +00:00
// Exports: default
2026-08-05 07:35:12 +00:00
// Module 8360 (useInvalidPreventRemoveError)
2026-07-23 10:11:24 +00:00
import _slicedToArray from "_slicedToArray" ;
2026-07-29 08:29:29 +00:00
import noop from "noop" ;
2026-07-23 10:11:24 +00:00
export default function useInvalidPreventRemoveError ( routes ) {
const setNextDismissedKey = first ( React . useState ( null ) , 2 ) ;
first = setNextDismissedKey [ 0 ] ;
let tmp3 = null ;
if ( first ) {
routes = routes . routes ;
const found = routes . find ( ( key ) => key . key === first ) ;
let name ;
2026-07-29 08:29:29 +00:00
if ( found != null ) {
2026-07-23 10:11:24 +00:00
name = found . name ;
}
tmp3 = name ;
}
React = tmp3 ;
const items = [ tmp3 ] ;
const effect = React . useEffect ( ( ) => {
2026-07-29 08:29:29 +00:00
if ( noop ) {
2026-07-23 10:11:24 +00:00
const _HermesInternal = HermesInternal ;
const _console = console ;
2026-07-29 08:29:29 +00:00
console . error ( "The screen '" + tmp + "' was removed natively but didn't get removed from JS state. This can happen if the action was prevented in a 'beforeRemove' listener, which is not fully supported in native-stack.\n\nConsider using a 'usePreventRemove' hook with 'headerBackButtonMenuEnabled: false' to prevent users from natively going back multiple screens." ) ;
2026-07-23 10:11:24 +00:00
}
} , items ) ;
return { setNextDismissedKey : setNextDismissedKey [ 1 ] } ;
} ;