You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
NM: Add support for native modules accessing ReactContext #3208
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.
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.
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
It is already implemented by the using the REACT_INIT attribute in C++ and ReactInitializerAttribute in C#. Please see the corresponding sample code in:
Activity
ViewManager Events (#3684)
jonthysell commentedon Nov 26, 2019
IReactContext exists, but we need to get the new ReactNativeHost straightened out first to fix the ordering.
CxxModules work like this:
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.
jonthysell commentedon Jan 8, 2020
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.
[-]NM: Add support for native modules emitting events using ReactContext[/-][+]NM: Add support for native modules accessing ReactContext[/+]vmoroz commentedon Apr 10, 2020
It is already implemented by the using the REACT_INIT attribute in C++ and ReactInitializerAttribute in C#. Please see the corresponding sample code in: