Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not working in react native #766

Open
Karkare-Shashank opened this issue Jan 2, 2024 · 2 comments
Open

Not working in react native #766

Karkare-Shashank opened this issue Jan 2, 2024 · 2 comments

Comments

@Karkare-Shashank
Copy link

I am trying to use StoreFront-api-client in ReactNative however its giving multiple issues such as URL is not implemented. Isn't this compatible with react native?

@yashmaurya321-crypto
Copy link

One possible solution is to use the react-native-url-polyfill package, which provides a polyfill for the URLSearchParams class (https://stackoverflow.com/questions/75757771/getting-the-urlsearchparams-set-is-not-implemented-error-when-trying-to-fetch)[1](https://stackoverflow.com/questions/75757771/getting-the-urlsearchparams-set-is-not-implemented-error-when-trying-to-fetch). You can install it using the following command:

npm install react-native-url-polyfill --save-dev

After installing the package, you can import it in your index.js file as follows:

import 'react-native-url-polyfill/auto';

This should create a polyfill for URLSearchParams and resolve the issue you’re facing

Copy link
Contributor

github-actions bot commented Mar 5, 2024

We're labeling this issue as stale because there hasn't been any activity on it for 60 days. While the issue will stay open and we hope to resolve it, this helps us prioritize community requests.

You can add a comment to remove the label if it's still relevant, and we can re-evaluate it.

@github-actions github-actions bot added the Stale label Mar 5, 2024
@paulomarg paulomarg transferred this issue from Shopify/shopify-api-js Apr 11, 2024
@github-actions github-actions bot removed the Stale label Apr 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants