-
Notifications
You must be signed in to change notification settings - Fork 209
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
[RFC] Support for React Native #222
Comments
I'll take a look! We are definitely interested in supporting React; thank you for reaching out. |
Great! I forgot to say that a polyfill for the NodeJS First I have tried porting tough-cookie to use the WHATWG url API instead of the legacy url API, that way I could use the great https://www.npmjs.com/package/react-native-url-polyfill. Unfortunately that didn't work out really well because the WHATWG API does not support relative URL's: So in the end I opted for https://www.npmjs.com/package/url (from the github repo, seeing as the npm package was last updated 6 years ago!). Probably using https://www.npmjs.com/package/native-url + https://www.npmjs.com/package/react-native-url-polyfill is a best match! |
This PR fixes salesforce#222 by: - introducing a fallback for the `util.*` code paths used as indicated in [this comment](salesforce#222 (comment)) - adding a dependency on `url-parse` to act as a polyfill for the usage of `require('url').parse`
This PR fixes salesforce#222 by: - introducing a fallback for the `util.*` code paths used as indicated in [this comment](salesforce#222 (comment)) - adding a dependency on `url-parse` to act as a polyfill for the usage of `require('url').parse` - configuring eslint to error on `no-restricted-modules` which will not be present in native environments
need this. fyi @colincasey |
Hello, thanks for the good work!
I have been using this library on React Native (together with Axios) and so far it's been working ok!
I only had to remove some debug code using the utils module: lb90@b43b4e9.
Would you be interested in React Native support or do you specifically target just NodeJS? I can provide a PR if such a feature is welcome!
The text was updated successfully, but these errors were encountered: