Closed Garamani closed 3 years ago
Have you tried importing from unsplash-js
(i.e. removing /native
)?
Unfortunately I have no experience with React Native so I don't know what changes would be required to make it work. If there was support in the previous version, this was added by someone who is no longer part of our team. We probably removed support in the new version because our primary target audience is browser/Node, not React Native.
If you're able to provide some guidance on what changes would be required to make this work, that would be most helpful. I can't promise we'll be able to spend any time on it though.
Thank you Oliver for your quick response. I just checked and by removing /native I get the following error:
TypeError: undefined is not a constructor (evaluating 'new _unsplashJs.default({ accessKey: '...' })')
I will investigate later what's the cause of the error.
I can not use also It show Error: not implemented
I upgraded the unsplash-js and found this error: Error: Unable to resolve module unsplash-js/native It seems after version 6.0.0 there is no native.js file. Would you please elaborate on why you are not supporting react-native anymore? Is there any alternative way to use unsplash API in react-native?