Skip to content
This repository was archived by the owner on May 20, 2026. It is now read-only.

keepalive component#63

Merged
chiefcll merged 5 commits into
mainfrom
keepAlive
Oct 3, 2025
Merged

keepalive component#63
chiefcll merged 5 commits into
mainfrom
keepAlive

Conversation

@chiefcll

Copy link
Copy Markdown
Contributor

No description provided.

@chiefcll
chiefcll requested a review from thetarnav July 28, 2025 14:49
@chiefcll

Copy link
Copy Markdown
Contributor Author

Hey @thetarnav - I am playing with this in the demo app and have:
<KeepAliveRoute id="browse" path="browse/:filter" component={Browse} preload={browsePreload} />

My question is I'm running the preload in a runWithOwner, but even so the Memo that is returned still gets cleaned up.

export function browsePreload(props) {
  const params = props().params;
  return createMemo(() => {
    const provider = browseProvider(params.filter || "all");
    provider(1);
    onCleanup(() => {
      console.log('bye memo')
    });
    return provider;
  });
}

The browse page is not being cleaned up... Another question is the params are created in the router and I can't change their owner (or can i?) - Let me know your thoughts on this approach. Browse page is caching

@chiefcll chiefcll changed the title WIP for keepalive component keepalive component Oct 3, 2025
@chiefcll
chiefcll merged commit 77156ae into main Oct 3, 2025
1 check failed
@chiefcll
chiefcll deleted the keepAlive branch October 3, 2025 20:53
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant