Skip to content

Conversation

@vmoroz
Copy link
Member

@vmoroz vmoroz commented Oct 23, 2019

Requiring the MainReactNativeHost component in each sample project that we plan to generate by CLI seems to be an unnecessary overhead. All application-wide properties can be set directly on the ReactApplication component.

In this change:

  • we removed the MainReactNativeHost from samples;
  • added new properties to ReactApplication to be specified in constructor instead of MainReactNativeHost.

Note, that the new ReactApplication properties are the same as they used to be in MainReactNativeHost. We just let them to be set in constructor instead of overriding. In one of the next changes we might change the property names and how they are grouped.

Microsoft Reviewers: Open in CodeFlow

@vmoroz vmoroz requested review from a team, NikoAri, acoates-ms, jonthysell and stmoy October 23, 2019 16:32
@vmoroz vmoroz requested a review from a team as a code owner October 23, 2019 16:32
@vmoroz vmoroz merged commit c48a594 into microsoft:master Oct 23, 2019
ReactApplicationDelegate __stdcall CreateReactApplicationDelegate() {
return winrt::Microsoft::ReactNative::ReactApplicationDelegate(*this);
}
virtual ReactApplicationDelegate __stdcall CreateReactApplicationDelegate();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

__stdcall [](start = 35, length = 9)

why is this necessary?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure. It was there before. I would like to remove the ReactApplicationDelegate in future iterations. IMHO, there are too many types in the API that we must remove.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants