From a1206796190c65e507682ba1e4c9a05d9a9c5f3d Mon Sep 17 00:00:00 2001 From: David Vacca Date: Mon, 12 Dec 2022 20:05:23 -0800 Subject: [PATCH] Add support for String props on C++ Components Summary: This diff adds support for String props on C++ Components changelog: [internal] internal Reviewed By: genkikondo Differential Revision: D41784029 fbshipit-source-id: 3065186074e1feca3dd0dd724105f1596146ee1d --- .../src/main/jni/react/cxxcomponents/Component.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/ReactAndroid/src/main/jni/react/cxxcomponents/Component.h b/ReactAndroid/src/main/jni/react/cxxcomponents/Component.h index 12c083500959d4..f0961a8b6a0857 100644 --- a/ReactAndroid/src/main/jni/react/cxxcomponents/Component.h +++ b/ReactAndroid/src/main/jni/react/cxxcomponents/Component.h @@ -20,9 +20,15 @@ class Component { virtual ~Component() = default; - // Updates the prop with name and value received as a parameter in the + // Updates the prop with name and float value received as a parameter in the // component - virtual void updateFloatProp(const std::string &propName, float value) = 0; + virtual void updateFloatProp(const std::string &propName, float value){}; + + // Updates the prop with name and string value received as a parameter in the + // component + virtual void updateStringProp( + const std::string &propName, + const std::string &value){}; // Mounts the child component into the children index received as parameter virtual void mountChildComponent(