lelandrichardson / lelandrichardson/react-native-safe-module

Breaks Non-ios, non-android platforms

Open
#7 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
117
Forks
9
PR merge metrics
No merged PRs in 30d

Description

I'm trying to use ptmt/react-native-macos to use react-native on macos, but modules that use this safe module (in particular, react-native-community/lottie-react-native), are broken by the use of this safe module wrapper. I.e., even if the module supports macos, I get the mock when using the SafeModule rather than the real module.

What's the motivation for the "always mock" fallback in SafeModule.js? I think this library might be better if all platforms at least tried to load the native module; since this would allow people on community-supported platforms to use this library without always getting the mock version.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in SafeModule.js and inspect the "always mock" fallback used for platforms other than iOS and Android. Verify how the native module is selected on macOS, then confirm that supported non-iOS, non-Android platforms attempt to load the native module instead of always returning the mock.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, macos, react-native
Domain
desktop, mobile
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.