Skip to content

Commit

Permalink
isolate mapbuffer only to components that use it (#44521)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #44521

changelog: [internal]

mapbuffer leaks into every component even though it is only used by 2: Paragraph and TextInput. Let's isolate it only to those two.

To do that, I added a new template prop: usesMapBufferForStateData. It is false by default and only Paragraph and TextInput set it to true.

Reviewed By: christophpurrer

Differential Revision: D56636011

fbshipit-source-id: 4a99e6e68caaf40111b6b7b205854a71f33c5864
  • Loading branch information
sammy-SC authored and facebook-github-bot committed May 11, 2024
1 parent 5c798fa commit 3f17c8b
Show file tree
Hide file tree
Showing 14 changed files with 29 additions and 190 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ const FileTemplate = ({
#ifdef ANDROID
#include <folly/dynamic.h>
#include <react/renderer/mapbuffer/MapBuffer.h>
#include <react/renderer/mapbuffer/MapBufferBuilder.h>
#endif
namespace facebook::react {
Expand All @@ -57,9 +55,6 @@ public:
folly::dynamic getDynamic() const {
return {};
};
MapBuffer getMapBuffer() const {
return MapBufferBuilder::EMPTY();
};
#endif
};
`.trim();
Expand Down

0 comments on commit 3f17c8b

Please sign in to comment.