You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When passing an onClick handler to elements like AppBarButton and Button, the app will crash when attempting to render a screen containing react-native-xaml components for a second time. This only occurs in release mode builds. It doesn't occur in Debug builds with web debugging enabled or with web debugging disabled. This also occurs whether the app uses Chakra or Hermes. However, this does not occur if you only ever click the "Go back (Pressable)" button, leading me to believe there's something funky going on with how react-native-xaml handles JS callbacks.
Notes:
When rendering the AddScreen, you may still see the Add button from HomeScreen. This is a bug in react-navigation.
I tried to create a repro that works without react-navigation, but the following code didn't trigger the issue. I think this might mean that the issue is related to React Context, which this example does not use, but both react-navigation and react-router do use.
When passing an
onClick
handler to elements likeAppBarButton
andButton
, the app will crash when attempting to render a screen containingreact-native-xaml
components for a second time. This only occurs in release mode builds. It doesn't occur in Debug builds with web debugging enabled or with web debugging disabled. This also occurs whether the app uses Chakra or Hermes. However, this does not occur if you only ever click the "Go back (Pressable)" button, leading me to believe there's something funky going on with howreact-native-xaml
handles JS callbacks.Reproduction steps:
npx react-native init AppName --template react-native-template-typescript
cd AppName
npx react-native-windows-init --overwrite --useHermes
ornpx react-native-windows init --overwrite --language cs
yarn add react-native-safe-area-context react-native-screens @react-navigation/native @react-navigation/stack
Expected Result:
App renders
AddScreen
containing two buttons.Actual Result:
App crashes with an unhandled exception.
App.tsx
Dependency versions
Notes:
When rendering the
AddScreen
, you may still see theAdd
button fromHomeScreen
. This is a bug inreact-navigation
.I tried to create a repro that works without
react-navigation
, but the following code didn't trigger the issue. I think this might mean that the issue is related to React Context, which this example does not use, but bothreact-navigation
andreact-router
do use.Example that does not trigger the issue
The text was updated successfully, but these errors were encountered: