Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

麻烦兼容下rn 0.64.0 #444

Open
ivanzhang2 opened this issue Mar 18, 2021 · 12 comments
Open

麻烦兼容下rn 0.64.0 #444

ivanzhang2 opened this issue Mar 18, 2021 · 12 comments

Comments

@ivanzhang2
Copy link

文件
components/ListRow/TouchableOpacity.js
修改
import Easing from 'react-native/Libraries/Animated/src/Easing';

import Easing from 'react-native/Libraries/Animated/Easing';

@yz1311
Copy link

yz1311 commented Mar 31, 2021

可以直接这样更改,新旧RN版本都兼容

import {Platform, TouchableWithoutFeedback, Animated, ViewPropTypes, Easing} from 'react-native';

嫌麻烦可以用下我的私包,不过相比原项目改动较多
https://github.com/yz1311/teaset

@basicButtons
Copy link

文件
components/ListRow/TouchableOpacity.js
修改
import Easing from 'react-native/Libraries/Animated/src/Easing';

import Easing from 'react-native/Libraries/Animated/Easing';

我这边改过了,目前不报错了,但是还是没有任何效果

@basicButtons
Copy link

我已经解决了,使用 本来是想要使用 Toast.message('Toast message'); 这个方法,但是没有办法显示,后面加了一下参数,使用的是自定义部分的就OK了
static customKey = null;

showCustom() {
if (ToastExample.customKey) return;
ToastExample.customKey = Toast.show({
text: 'Toast custom',
icon: ,
position: 'top',
duration: 1000000,
});
}

hideCustom() {
if (!ToastExample.customKey) return;
Toast.hide(ToastExample.customKey);
ToastExample.customKey = null;
}

@letterz
Copy link

letterz commented Jul 4, 2021

可以直接这样更改,新旧RN版本都兼容

import {Platform, TouchableWithoutFeedback, Animated, ViewPropTypes, Easing} from 'react-native';

嫌麻烦可以用下我的私包,不过相比原项目改动较多
https://github.com/yz1311/teaset
还是不行,复制命令下载要报错

@yz1311
Copy link

yz1311 commented Jul 5, 2021

@letterz 这个我是在线上用的,包不行的话,你用着patch-package改下原包也行

@letterz
Copy link

letterz commented Jul 5, 2021 via email

@letterz
Copy link

letterz commented Jul 5, 2021 via email

@yz1311
Copy link

yz1311 commented Jul 5, 2021

你百度下patch-package不早就出来了

@xinyangmaojian
Copy link

文件
components/ListRow/TouchableOpacity.js
修改
import Easing from 'react-native/Libraries/Animated/src/Easing';

import Easing from 'react-native/Libraries/Animated/Easing';

补充一下:
我修改后不报错了,但没效果。
因为我的背景是默认的那种背景,类似白色,而teaset的ThemeDefault中,defaultcolor是“#fff”
然后我试着修改了一下teaset的Theme,在入口处增加:
import {Theme} from 'teaset';
Theme.set(Theme.themes.black);
然后toast就显示了出来。

@xinyangmaojian
Copy link

这个teaset不能用对我来说还是挺麻烦的,作为一个新人现在在一个团队里面做事,负责前端,弄不出来就很尴尬

------------------ 原始邮件 ------------------ 发件人: "rilyu/teaset" @.>; 发送时间: 2021年7月5日(星期一) 上午9:51 @.>; @.@.>; 主题: Re: [rilyu/teaset] 麻烦兼容下rn 0.64.0 (#444) @letterz 这个我是在线上用的,包不行的话,你用着patch-package改下原包也行 — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

https://juejin.cn/post/6962554654643191815
https://juejin.cn/post/6844904104838299661
你看看这个有用不,我也是新手

@Mihai-github
Copy link

Hi,

Does someone know how to solve this issue Unable to resolve module react-native/Libraries/Animated/src/AnimatedEvent ?

@StevenGardnerGMJ
Copy link

Hi,

Does someone know how to solve this issue Unable to resolve module react-native/Libraries/Animated/src/AnimatedEvent ?

cmd + P search TouchableOpacity.js

change:

import Easing from 'react-native/Libraries/Animated/Easing';

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants