Skip to content

Instantly share code, notes, and snippets.

View ivanpagac's full-sized avatar

Ivan Pagáč ivanpagac

  • Accenture, Slovakia
  • Bratislava
View GitHub Profile
function remove_rctwebview(){
local dir="${BASE_DIR}/node_modules/react-native/React";
sed -i'.bak' '/RCTWebView/d' "${dir}/React.xcodeproj/project.pbxproj"
rm -f "${dir}/React.xcodeproj/project.pbxproj.bak"
rm -f "${dir}/Views/RCTWebView.m"
rm -f "${dir}/Views/RCTWebView.h"
rm -f "${dir}/Views/RCTWebViewManager.m"
rm -f "${dir}/Views/RCTWebViewManager.h"
export const useAnimateOpacityOnValueChange = (
valueToWatchForChange: boolean,
trueOpacityValue: number = 1,
falseOpacityValue: number = 0.4
) => {
const calculateOpacity = (val: boolean) =>
valueToWatchForChange ? trueOpacityValue : falseOpacityValue;
const opacityAnimatedValue = useRef(
new Animated.Value(calculateOpacity(valueToWatchForChange))