-
Notifications
You must be signed in to change notification settings - Fork 493
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
RFC: react-native 0.63 -- Pressable #1222
Comments
I think I would appreciate some input from other contributors on this one, particularly around the strategic implementation questions -- @erictraut @mikehardy -- any thoughts? |
Replacing the RX.Button implementation to use RN.Pressable sounds like a reasonable approach. It sounds like it maps well to the semantics of RX.Button, so I'd recommend swapping implementations rather than adding a new primitive that overlaps RX.Button's behaviors. I don't know enough about RN.Pressable to say whether this switch can be done without a breaking change in ReactXP. Some experimentation will probably need to be done. A breaking change isn't a deal-breaker, but it would need to be handled more carefully (e.g. a major version change). |
Thanks for the response @erictraut -- I wasn't aware if wholesale switching We already need a breaking version update to extract the Storage extension #1053, and I want to fix the ContextTypes as well which drops older React Versions #1128, so I'm leaning towards suggesting the next release be a breaking release! Next release milestone -> https://github.com/microsoft/reactxp/milestone/1 |
react-native 0.63 is out, and one of the key changes is that RN has a new component/model for pressable type elements.
As I understand it, this API model is intended to replace all the
Touchable*
family of APIs -- and indeed it appears to have several high level advantages that I see directly:onPressIn
/onPressOut
styling callbacks Add onPressIn and onPressOut to View #1135 -- this was a clunky issue that we had to implement when using RX in our app, so it'd be great to be able to delete that state-tracking code.onLongPress
References
Questions
Touchable
for the native-common interface?Strategies
Prerequisite: Provide a Polyfill implementing some or all of Pressable or drop RN versions
A. Switch all use cases of
Touchable
toPressable
in native-common --RX.Button
could be an alias / wrapper directly forRN.Pressable
?B. Expose
RX.Pressable
as a free standing component? -- Keep the rest of RX's native-common usingTouchable
?C. Suggestions?
The text was updated successfully, but these errors were encountered: