Skip to content

[Feature Request] Possible improvements to cross-platform support #795

Open
@leggomuhgreggo

Description

@leggomuhgreggo

Background

I am working on implementing stripe in a cross-platform* expo app, and trying to sort through how to handle the stripe features for different platforms.

[ *Technically it's only shipping to ios, but we use web for E2E testing ]

Acknowledgements

To be fair, it's really not much trouble for us to write our implementation so that the Stripe SDK invocations are behind platform conditioning — just shimming the export interface in a parallel *.web.tsx file, etc

And I understand that this library is intended for just native platforms. [ Related: #372 (comment) ]

Platform Conditioning?

But it would be so cool if the lib exports had platform conditioning baked in. One alternative to shimming the "main" exported modules themselves, would be to shim/condition *just* the specific SDK features that relied on Native APIs — that way it would have at least partial functionality in web!

I think it might even be possible to condition those native API usages, based on the availability of the given API — as opposed to platform — that way if web browsers ever adds support for (say) bluetooth — the functionality will be there.

Conclusion

I understand if roadmap constraints + scope concerns make this difficult to accommodate in the near term. I suspect that this use case will become increasingly common, so it may be advantageous in that sense.

Thank you for your consideration!

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions