Skip to content

Self-mounting components don't call _mount from ProxyComponent #10

Closed
@ekhaled

Description

@ekhaled

Related to sveltejs/svelte-loader#43
and sveltejs/svelte#1201

when a top-level component calls this._mount() it's calling _mount from the internal instance.. and not from the proxyComponent.
Therefore it does not register itself in the Registry. Therefore, when navigating away and back in sapper, the Registry doesn't have a clue whether the component is mounted and doesn't _rerender the component

How to reproduce

On the sapper-template

  1. Go to /about
  2. Change something, see it get hot-loaded
  3. Go to home
  4. Go back to /about
  5. Now change something... it won't get hot-loaded

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