Transform <G> with setNativeProps possible?
See original GitHub issueI need to move and scale individual<G>
elements with setNativeProps. Nothing I’ve tried seems to work.
I tried:
setNativeProps({x: newX, y: newY})
setNativeProps({x: newX.toString(), y: newY.toString()})
setNativeProps({transform: [{translateX: newX}, {translateY: newY}])
If I use setNativeProps directly on a <Circle>
for example, everything works fine.
- Does
G
implement setNativeProps? - What syntax should I use for setting scale and position on a group?
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:8
Top Results From Across the Web
Transform <G> with setNativeProps possible? #556 - GitHub
I need to move and scale individual elements with setNativeProps. Nothing I've tried seems to work. I tried: setNativeProps({x: newX, ...
Read more >Transform <G> with setNativeProps possible with react-native ...
I'm now on an FPS-hunt.. Would it be better (or even possible) to set the Svg viewbox via setNativeProps? I.e. would it be...
Read more >Direct Manipulation - React Native
setNativeProps is imperative and stores state in the native layer (DOM, UIView, etc.) and not within your React components, which makes your ...
Read more >Navigate to a new page after Onbording with React-Native ...
Transform <G> with setNativeProps possible with react-native-svg? ... How can I pass a props from component A to C while has a B...
Read more >4. Components for Mobile - Learning React Native, 2nd ...
You'll likely want to create styled components as a sort of shorthand ... This in turn makes it easier to maintain the styling...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@msageryd You probably need to use something like:
setNativeProps({ matrix: [scaleX, skewY, skewX, scaleY, translateX, translateY] })
https://snack.expo.io/@msand/shallow-celery