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

Reuse elements in case route does not change #127

Closed
FrankHossfeld opened this issue Apr 14, 2020 · 0 comments
Closed

Reuse elements in case route does not change #127

FrankHossfeld opened this issue Apr 14, 2020 · 0 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@FrankHossfeld
Copy link
Collaborator

FrankHossfeld commented Apr 14, 2020

Actually, Nalu will always update the DOM, even if the element, that will be display for the next route is the same one, that will be attached for the new route. Even, if the caching feature is used, a detach and attach will be done.

To tell Nalu, to reuse an existing component (which is already attached to the DOM), a new attribute is used: creationMode.

The creationMode has two possible values:

  • CREATE: Nalu will always attach and detach the component. With this value, Nalu behave in the same way as it does today.
  • REUSE: Choosing this value, Nalu will reuse element in case it is already attach to the DOM. In this case, Nalu will not do a detach/attach for the component of the new route if it is already attached.
@FrankHossfeld FrankHossfeld self-assigned this Apr 15, 2020
@FrankHossfeld FrankHossfeld added the enhancement New feature or request label Apr 15, 2020
@FrankHossfeld FrankHossfeld added this to the 2.1.0 milestone Apr 15, 2020
FrankHossfeld added a commit that referenced this issue Apr 15, 2020
commit 57b18aa
Author: FrankHossfeld <[email protected]>
Date:   Wed Apr 15 08:04:52 2020 +0200

    # 127 - Reuse elements in case route does not change

commit 33038ff
Author: FrankHossfeld <[email protected]>
Date:   Wed Apr 15 08:02:31 2020 +0200

    # 127 - Reuse elements in case route does not change
@FrankHossfeld FrankHossfeld modified the milestones: 2.1.0, 2.0.2 Jul 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant