Check out example codes for "using buidfeatures to enable viewbinding". It will help you in understanding the concepts better.

Code Example 1

// Android Studio 4.0
android {
    buildFeatures {
        viewBinding = true
    }
}

Learn ReactJs, React Native from akashmittal.com