What is “autolinking” in react-native?

Technology CommunityCategory: React NativeWhat is “autolinking” in react-native?
VietMX Staff asked 3 years ago

Autolinking is a mechanism built into the react-native-cli that allows adding a dependency with native components for React Native to be as simple as:

// install
yarn add react-native-webview
cd ios && pod install && cd .. // CocoaPods on iOS needs this 							extra step
// run
yarn react-native run-ios
yarn react-native run-android

Autolinking is a replacement for react-native link that brings new features (such as ability to easily integrate native dependencies on iOS) and fixes some of the long-standing issues.