You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've tried using setNativeProps on both Text and TSpan to update the positioning of the text, but when setting x or y using setNativeProps the text disappears. Similar behavior happens when updating children of Text with a string, but a workaround for that is to and and update the children of TSpan
Environment info
Library version: 12.1.0
Short, Self Contained, Correct (Compilable), Example
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. You may also mark this issue as a "discussion" and I will leave this open.
Hello, it seems like you attempted to change the x and y values, and as a result, it moved your component out of the viewBox. A better approach for moving elements is to use useState, react-native Animated, or react-native-reanimated. Just as a heads up, in fabric architecture, using setNativeProps can cause components to rerender. You can find more information about this in this thread.
I'm closed the issue, but if you have any other questions feel free to ask.
Thank you.
Bug
Unexpected behavior
I've tried using
setNativeProps
on bothText
andTSpan
to update the positioning of the text, but when settingx
ory
usingsetNativeProps
the text disappears. Similar behavior happens when updatingchildren
ofText
with a string, but a workaround for that is to and and update the children ofTSpan
Environment info
Library version: 12.1.0
Short, Self Contained, Correct (Compilable), Example
Here's a snack to reproduce https://snack.expo.io/@taylor123/rnsvg-text-setnativeprops
The text was updated successfully, but these errors were encountered: