Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[core] Introduce a NativeModule class in JS #27510

Merged
merged 1 commit into from
Mar 11, 2024

Conversation

tsapeta
Copy link
Member

@tsapeta tsapeta commented Mar 7, 2024

Why

Native modules should also be event emitters, so we need to make them something more than just raw objects.

How

Introduces NativeModule class in JS on iOS and Android that inherits from EventEmitter. Native modules are instances of that class (except the core module!).

Test Plan

Tested in bare-expo on both iOS and Android and checked that module objects contain EventEmitter methods (which was the main goal)

@expo-bot
Copy link
Collaborator

expo-bot commented Mar 11, 2024

The Pull Request introduced fingerprint changes against the base commit: a05bfbc

Fingerprint diff
[
  {
    "type": "dir",
    "filePath": "../../packages/expo-modules-core/android",
    "reasons": [
      "expoAutolinkingAndroid"
    ],
    "hash": "3aba41c82a7addef79279dc5e1d8320e19c5f335"
  }
]

Generated by PR labeler 🤖

@tsapeta tsapeta force-pushed the @tsapeta/core/introduce-native-module-class branch from d4a9137 to 151a55f Compare March 11, 2024 15:22
@expo-bot expo-bot added bot: passed checks ExpoBot has nothing to complain about and removed bot: suggestions ExpoBot has some suggestions labels Mar 11, 2024
@tsapeta tsapeta marked this pull request as ready for review March 11, 2024 16:14
@tsapeta tsapeta merged commit b1841be into main Mar 11, 2024
11 of 12 checks passed
@tsapeta tsapeta deleted the @tsapeta/core/introduce-native-module-class branch March 11, 2024 23:06
@brentvatne brentvatne added the published Changes from the PR have been published to npm label Apr 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bot: fingerprint changed bot: passed checks ExpoBot has nothing to complain about published Changes from the PR have been published to npm
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants