React将DOM引用暴露给父组件

时间:2017-08-10 23:45:28

标签: javascript reactjs ref

我正在学习docs,但没有得到以下一行

buildscript {
    repositories {
        maven { url 'https://maven.fabric.io/public' }
    }

    dependencies {
        classpath 'io.fabric.tools:gradle:1.+'
    }
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'

repositories {
    maven { url 'https://maven.fabric.io/public' }
}


android {
    compileSdkVersion 25
    buildToolsVersion '25.0.2'
    defaultConfig {
        applicationId "com.mycompany.ourapp"
        minSdkVersion 14
        targetSdkVersion 23
        versionCode 62
        versionName "1.0.62"
        compileOptions {
            sourceCompatibility JavaVersion.VERSION_1_7
            targetCompatibility JavaVersion.VERSION_1_7
        }
        signingConfig signingConfigs.config
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
        }
    }
    productFlavors {
        Red {
            setProperty("archivesBaseName", "red")
        }
        Blue {
            setProperty("archivesBaseName", "blue")
        }
    }


    applicationVariants.all { variant ->
        variant.outputs.each { output ->
            def path = "C:/AndroidBuilds/MyCompany.Build/" + "/"
            def SEP = "-"
            def flavor = variant.productFlavors[0].name
            def version = variant.versionCode
            def newApkName = path + version + SEP + flavor
            def newApkNameNoVersion = path + flavor
            output.outputFile = new File(newApkName + ".apk")

    }
}

dependencies {
    }
}

为什么最后会有inputRef={el => this.inputElement = el} ?是不是= el只是一个获取输入引用的函数?

0 个答案:

没有答案