Skip to content

Commit

Permalink
isolate use of folly to interpolateViewProps on Android
Browse files Browse the repository at this point in the history
Summary:
changelog: [react-native]

the only place in view module that uses folly is `ViewPropsInterpolation.h` and that is only on Android. 
This diff makes that dependency explicit and make it android only.

Differential Revision: D67942951
  • Loading branch information
sammy-SC authored and facebook-github-bot committed Jan 9, 2025
1 parent f69a817 commit 87402bd
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 0 additions & 2 deletions packages/react-native/ReactCommon/React-Fabric.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,7 @@ Pod::Spec.new do |s|
end

ss.subspec "view" do |sss|
sss.dependency folly_dep_name, folly_version
sss.dependency "Yoga"
sss.compiler_flags = folly_compiler_flags
sss.source_files = "react/renderer/components/view/**/*.{m,mm,cpp,h}"
sss.exclude_files = "react/renderer/components/view/tests", "react/renderer/components/view/platform/android", "react/renderer/components/view/platform/windows"
sss.header_dir = "react/renderer/components/view"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
#include <react/renderer/components/view/ViewProps.h>
#include <react/renderer/graphics/Transform.h>

#ifdef ANDROID
#include <folly/dynamic.h>
#endif

namespace facebook::react {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@

#pragma once

#include <folly/Conv.h>
#include <folly/dynamic.h>
#include <glog/logging.h>
#include <react/debug/react_native_expect.h>
#include <react/renderer/components/view/primitives.h>
Expand Down

0 comments on commit 87402bd

Please sign in to comment.