-
Notifications
You must be signed in to change notification settings - Fork 27
Open
Description
When importing and using the createClient function in a React Native project this warning is logged to the console:
WARN Require cycle: node_modules\whatwg-fetch\dist\fetch.umd.js -> node_modules\react-native\Libraries\Network\fetch.js -> node_modules\whatwg-fetch\dist\fetch.umd.js
Require cycles are allowed, but can result in uninitialized values. Consider refactoring to remove the need for a cycle.
AppScreen@http://10.0.2.2:8081/index.bundle?platform=android&dev=true&minify=false&app=com.awesomequotes&modulesOnly=false&runModule=true:109773:36
RCTView
View
RCTView
View
AppContainer@http://10.0.2.2:8081/index.bundle?platform=android&dev=true&minify=false&app=com.awesomequotes&modulesOnly=false&runModule=true:76752:36
AwesomeQuotes(RootComponent)@http://10.0.2.2:8081/index.bundle?platform=android&dev=true&minify=false&app=com.awesomequotes&modulesOnly=false&runModule=true:83145:28
WARN Require cycle: node_modules\react-native\Libraries\Network\fetch.js -> node_modules\react-native\Libraries\Network\fetch.js
Repro:
- Create a React Native project (guide here: https://reactnative.dev/docs/environment-setup)
- Modify
App.jsand add
import { createClient } from 'pexels';
async componentDidMount() {
const client = createClient(API_KEY);
const res = await client.videos.search({ query: "Nature", size: "small", orientation: "landscape", per_page: NumVideos });
}
Environment: React Native running on Android emulator, Android 11.
Metadata
Metadata
Assignees
Labels
No labels