Skip to content
This repository has been archived by the owner on Aug 15, 2024. It is now read-only.

Error: URL.pathname not implemented #201

Open
nijarv opened this issue Mar 16, 2023 · 1 comment
Open

Error: URL.pathname not implemented #201

nijarv opened this issue Mar 16, 2023 · 1 comment

Comments

@nijarv
Copy link

nijarv commented Mar 16, 2023

Steps to Reproduce

  • Install the npm in a react native project and try running

Observed Behaviour

simulator_screenshot_B2EB223E-8C13-4D76-846E-886D9274B386

Expected Behaviour

  • To fetch what I need

Technical Notes

  • react-native : 0.70.4
  • react : 18.1.0
  • unsplash-js: 7.0.15

Code

const serverApi = createApi({ accessKey: unsplash_access_key });
serverApi.search.getPhotos({ query: searchText, page: 1, perPage: 10 }).then(photoResp => {
            if (photoResp.errors) {
                return
            }

            const photo = result.response;
            console.log(photo);
        }).catch((err) => {
            console.log(err);
        });
@iamnsrajput
Copy link

I have the same error. @nijarv did u got the solution ?

"react": "18.2.0",
"react-native": "0.72.4",
"unsplash-js": "^7.0.18"

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants