Skip to content

Excessive reloads when switching component #188

Open
@tido64

Description

@tido64

Both setting the component name and initial props trigger a reload. This means that for the following block, we are calling ReloadView() twice, throwing away the work of the first call.

    ReactRootView().ComponentName(name);
    ReactRootView().InitialProps(initialProps);

ReloadView() checks whether a component name is set before doing anything, so unsetting the component name, doing all the set up needed, then setting the component name as the final step should fix this issue:

    ReactRootView().ComponentName({});
    ReactRootView().InitialProps(initialProps);
    ReactRootView().ComponentName(name);

However, this crashes the app. The issue has been filed upstream: microsoft/react-native-windows#5676.

Metadata

Metadata

Assignees

No one assigned

    Labels

    platform: WindowsThis affects WindowsupstreamThis should be fixed/reported upstream

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions