Replies: 1 comment 4 replies
-
Looks like |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
As I use RSD, one clear limitation is lack of control for the component that gets rendered under the hood, mainly on native.
For example, when I render
<html.img />
, on native I might want it to actually renderexpo-image
, orreact-native-fast-image
.Or, I might want to implement Reanimated v4's new CSS transitions, with
<html.div style={{ transitionProperty: 'opacity' }} />
, but under the hood I want it to render<Animated.View />
.Proposal
It would be useful add
as
or an equivalent:<html.img as={Platform.select({ native: FastImage })} />
The natural response might be to "just use those components". However, doing that breaks away from RSD and doesn't let components leverage its features like pseudo-states and more.
This feature makes more sense to be handled at the library or compiler level than in userland, but it can be a useful escape hatch nonetheless.
Beta Was this translation helpful? Give feedback.
All reactions