-
-
Notifications
You must be signed in to change notification settings - Fork 106
Open
Description
I have a several-step form which sometimes includes stripe. I'm already using a Script and it works. But now I want to Preload stripe javascript on the first step if I know for sure that second step will include stripe
So I'm doing
<React.Suspense>
<Preload href="https://js.stripe.com/v3/" rel="preload" as="script" />
</React.Suspense>which fails, since Preload renders children which are undefined. And I have to write <Preload href="https://js.stripe.com/v3/" rel="preload" as="script">{null}</Preload>.
So maybe change this line https://github.com/palmerhq/the-platform/blob/2e24147c26124f65519a69e73d17bcc8c61c2d91/src/Preload.tsx#L34 into return children || null?
Metadata
Metadata
Assignees
Labels
No labels