Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Excessive reloads when switching component #188

Open
Tracked by #559
tido64 opened this issue Aug 10, 2020 · 0 comments
Open
Tracked by #559

Excessive reloads when switching component #188

tido64 opened this issue Aug 10, 2020 · 0 comments
Labels
platform: Windows This affects Windows upstream This should be fixed/reported upstream

Comments

@tido64
Copy link
Member

tido64 commented Aug 10, 2020

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.

@tido64 tido64 added the platform: Windows This affects Windows label Aug 10, 2020
@tido64 tido64 added the upstream This should be fixed/reported upstream label Oct 17, 2021
@tido64 tido64 mentioned this issue Oct 17, 2021
34 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform: Windows This affects Windows upstream This should be fixed/reported upstream
Projects
None yet
Development

No branches or pull requests

1 participant