// the find
stripe-archive/react-stripe-elements
Moved to stripe/react-stripe-js.
The official React wrapper for Stripe Elements, built on the HOC pattern (injectStripe, StripeProvider) rather than hooks or render props. It's archived — the README itself redirects everyone to @stripe/react-stripe-js — so this is only relevant if you're maintaining a legacy integration that hasn't migrated yet.
Handles the real pain points of wrapping a non-React third-party script: async script loading, SSR (stripe prop starts null, set in componentDidMount), and using an externally-managed Stripe instance (e.g. from Redux). The docs are unusually thorough about Elements' actual behavior, like exactly how createToken/createPaymentMethod infer the Element reference. Props shapes are typed with Flow and the troubleshooting section calls out a genuinely nasty gotcha: shouldComponentUpdate in components like react-redux's connect() silently breaks context propagation from StripeProvider, with the fix (nest injectStripe outside connect, or use pure: false).
Dead since 2021 — last push predates React 18, hooks-based patterns, and current Stripe API versions, so you're pinned to old PaymentIntents/SetupIntents behavior. Architecture leans on React context + HOCs + a global '*Element' name-based lookup (elements.getElement('card')) instead of refs, which is fragile and was explicitly redesigned away in the successor. Class components and the shouldComponentUpdate/context footgun described in the README are inherent to this design, not edge cases — there's no fix coming. Depends on injectStripe wrapping order to work at all, which is an easy thing for a new contributor to get wrong with no compiler/lint check to catch it.