fireship-io / fireship.io

Build and ship your app faster https://fireship.io
3.52k stars 1.31k forks source link

courses/stripe-js/checkout-react/ #902

Open utterances-bot opened 2 years ago

utterances-bot commented 2 years ago

Checkout with React

Complete a checkout session and redirect to a success or fail page

https://fireship.io/courses/stripe-js/checkout-react/

organicolives commented 2 years ago

I'm a little confused by the code in the helper function, specifically: ...(body && { body: JSON.stringify(body) }),

As the body parameter is null, how would this ever evaluate to anything other than false?

I'm sure I'm missing something obvious...