Skip to content

Minimal support for other platforms#16

Merged
kmagiera merged 1 commit into
software-mansion:masterfrom
Minishlink:patch-1
Sep 25, 2018
Merged

Minimal support for other platforms#16
kmagiera merged 1 commit into
software-mansion:masterfrom
Minishlink:patch-1

Conversation

@Minishlink

Copy link
Copy Markdown
Contributor

Such as web and windows. requireNativeComponent is undefined on web.

This lives as a patch on DailyScrum - web version.

Such as web, windows...

@kmagiera kmagiera left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @Minishlink

I think this also closes #13

@kmagiera kmagiera merged commit cf695ff into software-mansion:master Sep 25, 2018
@brunolemos

brunolemos commented Oct 2, 2018

Copy link
Copy Markdown
Contributor

This did not fix it on web for me. It still gives this error:

'react-native' does not contain an export named 'requireNativeComponent'.

Which is the same error reported here: react-navigation/react-navigation#5004

Necolas explained that this import should not be on any file that runs on web: necolas/react-native-web#507 (comment)

Made #22 with a fix.

kkafar added a commit that referenced this pull request May 21, 2025
… debug mode (#16)

## Description

Added assertion, verifying that only a single tab is focused.
The assertion is currently enabled only in debug mode.

## Test code and steps to reproduce

Pass `isFocused={true}` to two tabs.

## Checklist

- [ ] Ensured that CI passes
kkafar added a commit that referenced this pull request Jul 16, 2025
… debug mode (#16)

## Description

Added assertion, verifying that only a single tab is focused.
The assertion is currently enabled only in debug mode.

## Test code and steps to reproduce

Pass `isFocused={true}` to two tabs.

## Checklist

- [ ] Ensured that CI passes
kkafar added a commit that referenced this pull request Jul 16, 2025
… debug mode (#16)

## Description

Added assertion, verifying that only a single tab is focused.
The assertion is currently enabled only in debug mode.

## Test code and steps to reproduce

Pass `isFocused={true}` to two tabs.

## Checklist

- [ ] Ensured that CI passes
maciekstosio pushed a commit that referenced this pull request Jul 17, 2025
… debug mode (#16)

## Description

Added assertion, verifying that only a single tab is focused.
The assertion is currently enabled only in debug mode.

## Test code and steps to reproduce

Pass `isFocused={true}` to two tabs.

## Checklist

- [ ] Ensured that CI passes
kkafar added a commit that referenced this pull request Dec 12, 2025
…#3475)

Fixes #3476

## Description

The destructor of `RNSScreenShadowNodeCommitHook` crashes during hot
reload because it tries to access `FabricUIManagerBinding` after the
React instance has been destroyed.

## Root Cause

The crash occurs because:
1. Hot reload destroys the React instance
2. `FabricUIManagerBinding` becomes null
3. The `CommitHook` destructor tries to unregister itself
4. `getUIManagerFromSharedContext()` calls `getBinding()` which accesses
null
5. JNI crashes when accessing the null object's field

This bug was introduced in #3295 (commit 91b17d5).

## Changes

Remove the unregister call from the destructor. This is safe because the
`UIManager` automatically cleans up all registered hooks when it's
destroyed, so manual unregistration is unnecessary.

## Test Code and Steps to Reproduce

1. Create any app with `@react-navigation/native-stack`
2. Enable New Architecture on Android
3. Run the app in development mode
4. Press `r` to hot reload
5. **Before fix**: App crashes with SIGABRT
6. **After fix**: App reloads successfully

## Crash Log (Before Fix)

```
F libc: Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE)
JNI DETECTED ERROR IN APPLICATION: field operation on NULL object: 0x0
  in call to GetObjectField
  from void com.facebook.jni.HybridData$Destructor.deleteNative(long)
```

## Stack Trace

```
#16 facebook::react::JFabricUIManager::getBinding()
#17 facebook::react::RNSScreenShadowNodeCommitHook::getUIManagerFromSharedContext
#18 facebook::react::RNSScreenShadowNodeCommitHook::~RNSScreenShadowNodeCommitHook
```

## Environment

- React Native: 0.83.0-rc.3 / 0.83.0-rc.5
- react-native-screens: 4.19.0-nightly-20251203
- Architecture: New Architecture (Fabric + Bridgeless)
- Platform: Android

---------

Co-authored-by: Kacper Kafara <kacperkafara@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants