Skip to content

Commit

Permalink
Enable layout animations on iOS in OSS
Browse files Browse the repository at this point in the history
Summary:
changelog: Enable Layout Animations on iOS

[LayoutAnimations](https://reactnative.dev/docs/next/layoutanimation) in New Architecture have been disabled in OSS on iOS because of unresolved crash. This crash only happens rarely. Turning on LayoutAnimations in OSS should be safe and brings New Architecture to parity with old.

Reviewed By: fkgozali

Differential Revision: D42708774

fbshipit-source-id: b0f7febee3aa4f0ddac25556644198ebe79378c1
  • Loading branch information
sammy-SC authored and facebook-github-bot committed Jan 25, 2023
1 parent ae557a1 commit 0a30aa3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions ReactCommon/react/config/ReactNativeConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ ReactNativeConfig::~ReactNativeConfig() {}
EmptyReactNativeConfig::EmptyReactNativeConfig() {}

bool EmptyReactNativeConfig::getBool(const std::string &param) const {
if (param == "react_fabric:enabled_layout_animations_ios") {
return true;
}
return false;
}

Expand Down
2 changes: 1 addition & 1 deletion ReactCommon/react/config/ReactNativeConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class ReactNativeConfig {
};

/**
* Empty configuration that will always provide "falsy" values.
* Empty configuration that will provide hardcoded values.
*/
class EmptyReactNativeConfig : public ReactNativeConfig {
public:
Expand Down
2 changes: 1 addition & 1 deletion ReactCommon/react/utils/ContextContainer.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class ContextContainer final {
* example if the type `T` is `std::shared_ptr<const ReactNativeConfig>`,
* then one would use `"ReactNativeConfig"` for the `key`, even if the
* instance is actually a `shared_ptr` of derived class
*`EmptyReactNativeConfig`.
*`ReactNativeConfig`.
*/
template <typename T>
void insert(std::string const &key, T const &instance) const {
Expand Down

0 comments on commit 0a30aa3

Please sign in to comment.