Skip to content

Commit

Permalink
Add support for String props on C++ Components
Browse files Browse the repository at this point in the history
Summary:
This diff adds support for String props on C++ Components

changelog: [internal] internal

Reviewed By: genkikondo

Differential Revision: D41784029

fbshipit-source-id: 3065186074e1feca3dd0dd724105f1596146ee1d
  • Loading branch information
mdvacca authored and facebook-github-bot committed Dec 13, 2022
1 parent a3c47d3 commit a120679
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions ReactAndroid/src/main/jni/react/cxxcomponents/Component.h
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit a120679

Please sign in to comment.