microsoft / microsoft/react-native-windows

Move SampleTurboModule out of core and into it's own package

Open
#13,535 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Area: Turbo Modules enhancement New Architecture Workstream: Gallery and Samples
Dominant language
C++
Stars
17.3k
Forks
1.2k
Avg merge
1d 13h
Merged PRs (30d)
33

Description

Summary

SampleTurboModule is defined in RN core, but really it's really only there to be used by the RNTester example page.

In PR #13533, we added RNW's SampleTurboModule impl in RNW core, but we have the opportunity to move it into its own package.

Motivation

So that end customers can actually use SampleTurboModule as a sample they can duplicate.

Basic Example
  1. New private package in packages/react-native-sample-turbo-module
  2. Update each of our apps that uses RNTester js (e2e-test-app, e2e-trest-app-fabric, playground, etc.) to depend on that package
Open Questions

Will it be possible for us to do this without requiring the upstream module to be moved out of core? Is this sample perhaps a good way of testing how to add platform support to a module even if you can't modify the package that contains its spec/definition?

Contributor guide

Open the contributing guide

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

Review the existing SampleTurboModule definition in RN core and the RNW implementation referenced by PR #13533. Trace its use in RNTester JS and the listed apps, including e2e-test-app, e2e-trest-app-fabric, and playground. Done means the private packages/react-native-sample-turbo-module package and required app dependencies are defined, with the upstream module question resolved.

Written by the indexing model from the issue text.

Assessment

Tech stack
react-native
Domain
mobile-dev, tooling
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.