Skip to content

Update sample to call preload at a more appropriate time #122

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

Merged
merged 2 commits into from
Oct 8, 2024

Conversation

kiftio
Copy link
Contributor

@kiftio kiftio commented Aug 23, 2024

What changes are you making?

The README states that preload() should be used responsibly as it results in background network requests and additional CPU/memory utilization for the client. And that it should only be used when there is a high likelihood that the buyer will soon request to checkout.

But the sample apps call it on each cart mutation / add to cart, which is more frequently than it needs to be called.

This updates the sample to follow the README advice, and only call preload() when a customer lands on the cart page.


It also updates an incorrect line r.e. min JDK version in the README

How to test

Click around in the sample

Before you merge

Important


Checklist for releasing a new version

Tip

See the Contributing documentation for instructions on how to publish a new version of the library.

@kiftio kiftio requested a review from a team as a code owner August 23, 2024 09:47
@kiftio kiftio changed the title update sample to call preload at a more appropriate time Update sample to call preload at a more appropriate time Aug 23, 2024
@kiftio kiftio merged commit 10b21f6 into main Oct 8, 2024
4 checks passed
@kiftio kiftio deleted the dk/preload-on-signal-user-will-enter-checkout branch October 8, 2024 08:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants