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

ReText cause app to crash 😵 ! #476

Open
SSOURABH58 opened this issue Dec 7, 2021 · 6 comments
Open

ReText cause app to crash 😵 ! #476

SSOURABH58 opened this issue Dec 7, 2021 · 6 comments

Comments

@SSOURABH58
Copy link
Contributor

SSOURABH58 commented Dec 7, 2021

Hi,

I was using ReText in the Redash version 16.2.2 it was working fine, But after updating to 16.2.3 the app started to crash again and again after I run expo run:android.

I started commenting out my components to find out the cause and the search stopped on the Retext component.
even a simple one like this caused my app to crash :

 const temp = useSharedValue("0");
...
<View>
    <ReText text={temp} />
</View>

I am using a custom expo client since I have to use the native blur lib @react-native-community/blur

other packages :

    "react-native": "0.64.3",
    "react-native-gesture-handler": "^1.10.3",
    "react-native-reanimated": "~2.2.0",
    "react-native-redash": "^16.2.3",
@SSOURABH58
Copy link
Contributor Author

I tried going back to 16.2.2 but still facing the same issue.

@tyogautomo
Copy link

tyogautomo commented Sep 18, 2022

im facing the same issue, found any solution?

Solution: it turns out that the text prop value must be a string

const progress = useSharedValue(0);
const progressText = useDerivedValue(() => `${progress.value * 100}`); // return a string

......

return (
.....
   <Retext text={progressText} />
.....
)

@hugoh59
Copy link

hugoh59 commented Dec 15, 2022

@wcandillon any help on this ?

@wcandillon
Copy link
Owner

For text animation the new recommend way is to use react-native-skia: https://github.com/shopify/react-native-skia

@Grohden
Copy link

Grohden commented Jan 3, 2024

@wcandillon so its not gonna be fixed here, and I'm supposed to be going to skia?

I wasn't really able to use skia on expo due to it being outdated, types are mismatched with the documentation (cuz its outdated in expo). Can you give a tutorial/doc of you porting a ReText from redash to skia on the latest expo?

I just wanted to render a text with my animated values, why should it be so troublesome to do it?

@wcandillon
Copy link
Owner

In SDK 50 the version of RN Skia shipped will be stable enough, I have to apologize for the API being quite different in Expo Go (due to our in Text being recent).
But if you take the version of RN Skia in SDK 49 and use the typescript type definitions, you might be able to go quite far

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

5 participants