SSR compatibility#128
Conversation
|
Hey @leebenson thanks for putting this together! Quoting a comment (#64 (comment)) from a few days ago:
Status update: we've moved from discussing to implementing, and I expect it to be completed shortly. The API we're introducing to support async loading is more general than just supporting SSR, so it should be a win-win all around. Given that we already have #120 tracking discussions around SSR specifically and #24 for async loading, I'm going to close this PR in the mean time. Thanks again! It's been awesome seeing how many people have gotten involved in with the development of react-stripe-elements. |
|
@jez any updates on async loading? It's been quite some time. Would appreciate it if we got some kind of timeframe (so we could decide whether to wait or roll our own stuff). Thank you! |
|
I actually have a PR out for this in #145. You can see the proposed API by viewing the rendered README. It's been approved, but we're still holding off on merging to give members of the community a chance to provide comments. If you're interested, check it out! Barring other changes, we'll probably merge it tomorrow. |
Summary & motivation
To create a version of the lib that works via SSR (server-rendered React.)
API review
There shouldn't be any direct API changes, although I did make remove some
.isRequiredfrom props to prevent console errors.Testing & documentation
Used it in production on a project build for ReactQL