From ea12c39d0d8a8bc4d16dcde3e456f68984edb5f5 Mon Sep 17 00:00:00 2001 From: KartonM Date: Thu, 14 Jul 2022 23:33:21 +0200 Subject: [PATCH] Correct minor mistake in native-components-android.md --- docs/native-components-android.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/native-components-android.md b/docs/native-components-android.md index fb275ff3cd4..17fdfb6c3f1 100644 --- a/docs/native-components-android.md +++ b/docs/native-components-android.md @@ -103,7 +103,7 @@ Annotation `@ReactProp` has one obligatory argument `name` of type `String`. Nam Except from `name`, `@ReactProp` annotation may take following optional arguments: `defaultBoolean`, `defaultInt`, `defaultFloat`. Those arguments should be of the corresponding type (accordingly `boolean`, `int`, `float` in Java and `Boolean`, `Int`, `Float` in Kotlin) and the value provided will be passed to the setter method in case when the property that the setter is referencing has been removed from the component. Note that "default" values are only provided for primitive types, in case when setter is of some complex type, `null` will be provided as a default value in case when corresponding property gets removed. -Setter declaration requirements for methods annotated with `@ReactPropGroup` are different than for `@ReactProp`, please refer to the `@ReactPropGroup` annotation class docs for more information about it. **IMPORTANT!** in ReactJS updating the property value will result in setter method call. Note that one of the ways we can update component is by removing properties that have been set before. In that case setter method will be called as well to notify view manager that property has changed. In that case "default" value will be provided (for primitive types "default" can value can be specified using `defaultBoolean`, `defaultFloat`, etc. arguments of `@ReactProp` annotation, for complex types setter will be called with value set to `null`). +Setter declaration requirements for methods annotated with `@ReactPropGroup` are different than for `@ReactProp`, please refer to the `@ReactPropGroup` annotation class docs for more information about it. **IMPORTANT!** in ReactJS updating the property value will result in setter method call. Note that one of the ways we can update component is by removing properties that have been set before. In that case setter method will be called as well to notify view manager that property has changed. In that case "default" value will be provided (for primitive types "default" value can be specified using `defaultBoolean`, `defaultFloat`, etc. arguments of `@ReactProp` annotation, for complex types setter will be called with value set to `null`).