Skip to content

How to use cache components by key? #270

Open

Description

@steveast

You can reproduce an issue here
Click on text and you get "did mount rx" over and over again, how to fix it?

Activity

  1. typeofweb commented on Dec 24, 2020

    @typeofweb
    Owner

    As you can see, the same happens when you're just mapping over the array without rxjs. It is an expected behaviour - when the key prop changes, the component gets unmounted.

  2. steveast commented on Dec 24, 2020

    @steveast
    Author

    As you can see, the same happens when you're just mapping over the array without rxjs. It is an expected behaviour - when the key prop changes, the component gets unmounted.

    But in the example it is not that.
    image

  3. typeofweb commented on Dec 24, 2020

    @typeofweb
    Owner

    Not when I run it:

    2BF4DA45-6B35-4B06-BA70-43F9DBFBC748

  4. steveast commented on Dec 24, 2020

    @steveast
    Author

    Not when I run it:

    After run, click on text, be attention, please.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions