Skip to content
This repository was archived by the owner on Jan 11, 2023. It is now read-only.

Skip preload update for session changes where possible #555

Open
Rich-Harris opened this issue Feb 3, 2019 · 0 comments
Open

Skip preload update for session changes where possible #555

Rich-Harris opened this issue Feb 3, 2019 · 0 comments

Comments

@Rich-Harris
Copy link
Member

As of #554, preload functions take a session object as the second argument, which is the current value of the writable session store whose initial value is provided by the server.

If the store is written to, preload functions are called again and components are updated. This is unnecessary in cases where those functions accept zero or one arguments. (Come to think of it, we can skip rerunning preload altogether if accepts zero arguments, regardless of whether params and query changed — a minor optimisation but worth taking.)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant