Skip to content

Commit 3f17c8b

Browse files
sammy-SCfacebook-github-bot
authored andcommitted
isolate mapbuffer only to components that use it (#44521)
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
1 parent 5c798fa commit 3f17c8b

14 files changed

Lines changed: 29 additions & 190 deletions

File tree

packages/react-native-codegen/src/generators/components/GenerateStateH.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,6 @@ const FileTemplate = ({
3535
3636
#ifdef ANDROID
3737
#include <folly/dynamic.h>
38-
#include <react/renderer/mapbuffer/MapBuffer.h>
39-
#include <react/renderer/mapbuffer/MapBufferBuilder.h>
4038
#endif
4139
4240
namespace facebook::react {
@@ -57,9 +55,6 @@ public:
5755
folly::dynamic getDynamic() const {
5856
return {};
5957
};
60-
MapBuffer getMapBuffer() const {
61-
return MapBufferBuilder::EMPTY();
62-
};
6358
#endif
6459
};
6560
`.trim();

0 commit comments

Comments
 (0)