[RFC] Support for React Native
lb90 opened this issue · comments
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!
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 url
module is also needed!
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!
need this.
fyi @colincasey
"tough-cookie": "https://github.com/colincasey/tough-cookie#0ef85bb3b7342ad3fa9d4b953aad24cbe5b8ae86",