Skip to content

NM: Add support for native modules accessing ReactContext #3208

Closed

Description

CxxModules normally have access to the react instance - we want out native modules to have access to the react context.

Activity

  1. ghost added
    Needs: Triage 🔍New issue that needs to be reviewed by the issue management team (label applied by bot)
    on Sep 24, 2019
  2. jonthysell commented on Nov 26, 2019

    @jonthysell
    ContributorAuthor

    IReactContext exists, but we need to get the new ReactNativeHost straightened out first to fix the ordering.

    CxxModules work like this:

    • Modules are created.
    • Instance is created.
    • Instance sets the instance on each module
    • Modules use the instance.

    But since we're crossing the winrt boundary, we need to pass in the context (wrapped instance) at creation time, since otherwise the modules have no way of getting a context.

  3. jonthysell commented on Jan 8, 2020

    @jonthysell
    ContributorAuthor

    As part of Vladimir Morozov (@vmoroz) 's hosting work, we should be able to get the correct ReactContext from thread storage for use by the native module.

  4. changed the title [-]NM: Add support for native modules emitting events using ReactContext[/-] [+]NM: Add support for native modules accessing ReactContext[/+] on Jan 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions