Skip to content
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

Checkout UI extension has been executed twice in both editor and actual thank you page #1435

Closed
eric-he-rokt opened this issue Oct 12, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@eric-he-rokt
Copy link

Please list the package(s) involved in the issue, and include the version you are using

"@shopify/ui-extensions": "2023.10.0",
"@shopify/ui-extensions-react": "2023.10.0",

Describe the bug

Steps to reproduce the behavior:

  1. Code for rendering a simple banner (without useEffect or useState) on the thank you page
import {
  reactExtension,
  View,
  Banner
} from '@shopify/ui-extensions-react/checkout';
export default reactExtension(
  'purchase.thank-you.block.render',
  () => <Extension />,
);
function Extension() {
  console.log(`render extension at ${Date.now()}`);
  return <View>
    <Banner
      status="critical"
      title="My extension"
    />
  </View>;
}
  1. Position and save the extension on the thank you page in the editor. UI has only one banner as expected, but we can see console.log has been executed twice.
  2. The same thing happens on the actual Thank you page.

Expected behavior

console.log should only execute once.

Screenshots

Screenshot 2023-10-12 at 3 27 23 pm

Additional context

@eric-he-rokt eric-he-rokt added the bug Something isn't working label Oct 12, 2023
@eric-he-rokt eric-he-rokt changed the title Checkout UI extension has been rendered twice in both editor and actual thank you page Checkout UI extension has been executed twice in both editor and actual thank you page Oct 12, 2023
@cpeddecord
Copy link
Contributor

Closing this as duplicate of #1006

@cpeddecord cpeddecord closed this as not planned Won't fix, can't repro, duplicate, stale Oct 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants