chramos / react-native-skeleton-placeholder

SkeletonPlaceholder is a React Native library to easily create an amazing loading effect.
MIT License
674 stars 120 forks source link

[question] react-native-community/masked-view is deprecated #85

Closed emauricio closed 1 year ago

emauricio commented 1 year ago

"@react-native-community/masked-view": "^0.1.11",

image

why changed back to that one on the latest version?

thx

chrismerino commented 1 year ago

Exactly, the package "@react-native-community/masked-view" is deprecated.

efstathiosntonas commented 1 year ago

patch to use the @react-native-masked-view/masked-view instead of the community one, use patch-package to apply it:

react-native-skeleton-placeholder+5.2.0.patch

diff --git a/node_modules/react-native-skeleton-placeholder/lib/SkeletonPlaceholder.js b/node_modules/react-native-skeleton-placeholder/lib/SkeletonPlaceholder.js
index 314a93a..90f5a5a 100644
--- a/node_modules/react-native-skeleton-placeholder/lib/SkeletonPlaceholder.js
+++ b/node_modules/react-native-skeleton-placeholder/lib/SkeletonPlaceholder.js
@@ -33,7 +33,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
     return (mod && mod.__esModule) ? mod : { "default": mod };
 };
 Object.defineProperty(exports, "__esModule", { value: true });
-const masked_view_1 = __importDefault(require("@react-native-community/masked-view"));
+const masked_view_1 = __importDefault(require("@react-native-masked-view/masked-view"));
 const React = __importStar(require("react"));
 const react_native_1 = require("react-native");
 const react_native_linear_gradient_1 = __importDefault(require("react-native-linear-gradient"));
FelipeLimaDeSouza commented 1 year ago

@emauricio I added "sed" in postinstall:

"postinstall": "./scripts/replace.sh"

In replace.sh:

sed -i '' 's/react-native-community/react-native-masked-view/g' node_modules/react-native-skeleton-placeholder/lib/SkeletonPlaceholder.js

chramos commented 1 year ago

oh, that's true! I hadn't noticed that react-native-masked-view/masked-view was deprecated I'll solve this issue ASAP

thank you guys

manoj-jar commented 1 year ago

hey @chramos any update on this ?

chramos commented 1 year ago

yes, it is fixed and I'll deploy a new version today https://github.com/chramos/react-native-skeleton-placeholder/pull/91/files