Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"type": "prerelease",
"comment": "Added C++ ReactContext for Module Initialize method",
"packageName": "react-native-windows",
"email": "vmorozov@microsoft.com",
"dependentChangeType": "patch",
"date": "2020-04-26T15:36:51.338Z"
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ struct SampleModuleCppImpl {
#pragma region Initialization

REACT_INIT(Initialize)
void Initialize(IReactContext const & /*reactContext*/) noexcept {
void Initialize(ReactContext const & /*reactContext*/) noexcept {
m_timer = winrt::Windows::System::Threading::ThreadPoolTimer::CreatePeriodicTimer(
[this](const winrt::Windows::System::Threading::ThreadPoolTimer) noexcept {
TimedEvent(++m_timerCount);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ namespace ReactNativeTests {
REACT_MODULE(SimpleNativeModule)
struct SimpleNativeModule {
REACT_INIT(Initialize)
void Initialize(React::IReactContext const &context) noexcept {
void Initialize(React::ReactContext const &context) noexcept {
IsInitialized = true;
TestCheck(context != nullptr);
TestCheck(context);

// Event and Function fields are initialized before REACT_INIT method call.
TestCheck(this->OnIntEvent != nullptr);
Expand Down
Loading