microsoft / microsoft/react-native-windows

Allow modules to run code during autolinking (to capture unmet implicit dependencies/requirements)

Open
#6,553 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Area: Native Modules bug enhancement Needs: Dev Design Workstream: Module Support
Dominant language
C++
Stars
17.3k
Forks
1.2k
Avg merge
1d 13h
Merged PRs (30d)
33

Description

Sometimes a community module will have requirements for the app to consume it successfully.
For example:

  • the react-native-print module requires that the app define a XAML Canvas element named RNPrintCanvas.
  • similarly, use of inking will require the app to set IsPerspectiveEnabled=false
  • C# modules require C++ apps to add the consumecsharpmodules property (this already works automatically)

In the case of react-native-print, this is documented in the module's readme, but it would be good if there was a way for the module to express requirements or even run some JS during autolink to either (in pri order):

  1. print a message explaining module requirements on the app
  2. check whether the condition is satisfied and if not print a message
  3. check the condition and fix it for the user

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

The issue does not name files or tests. Start by locating the autolinking entry point and how modules currently express requirements; compare the react-native-print, inking, and consume-csharp-modules cases. Define an agreed mechanism for reporting, checking, or fixing requirements, then validate it against those examples.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, csharp, javascript, react-native
Domain
build-system, mobile, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.