Back to Intellij Community

NonVarPropertyInExternalInterface

plugins/kotlin/code-insight/descriptions/resources-en/inspectionDescriptions/NonVarPropertyInExternalInterface.html

2025.3-rc-2334 B
Original Source

Reports val properties in external interfaces that extend React Props or State types in Kotlin/JS projects.

Properties in React component interfaces should be mutable (var) to work correctly with the JavaScript runtime.

Example:

external interface MyProps : Props {
    val title: String // Warning: should be var
}