-
Notifications
You must be signed in to change notification settings - Fork 11
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
Working with gestures #37
Comments
Cc @alfonsogcnunez
Thiago Temple <notifications@github.com> schrieb am Di., 14. Aug. 2018,
20:56:
… Hey there, I'm trying to work with some animation stuff and I'm having
some difficulties. You may have seen my PR alread
<#36> but I do
have another issue that I'd like to understand how to fix it.
The interface IViewProperties inherits from IGestureResponderHandlers
https://github.com/fable-compiler/fable-react-native/blob/143d057d002bb463179da191b67ba522413919d6/src/Fable.Helpers.ReactNative.fs#L427
And I was wondering how I could pass it to the view.
I began creating an object:
let panResponderConfig = createEmpty<Fable.Import.ReactNative.PanResponderCallbacks>
let panResponder = RN.PanResponder.create(panResponderConfig)
But then, how am I suppose to pass panResponder.panHandlers to the view?
Usually with javascript this is done this way:
this._panResponder = PanResponder.create({ .... })
<View {...this._panResponder.panHandlers}>....</View>
How can I replicate JavaScript's spread operator and how can I pass that
to IViewProperties?
Thanks
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#37>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AADgNCXSx6Ypi_lDKcIMRFpk-xxI9f5Cks5uQx1TgaJpZM4V8_iC>
.
|
There's no equivalent to the object spread operator in Fable, but you should be able to use createElementWithObjProps(RN.View, JS.Object.assign(createEmpty<ob>, panResponder.panHandlers) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey there, I'm trying to work with some animation stuff and I'm having some difficulties. You may have seen my PR alread but I do have another issue that I'd like to understand how to fix it.
The interface
IViewProperties
inherits fromIGestureResponderHandlers
fable-react-native/src/Fable.Helpers.ReactNative.fs
Line 427 in 143d057
And I was wondering how I could pass it to the view.
I began creating an object:
But then, how am I suppose to pass
panResponder.panHandlers
to the view?Usually with javascript this is done this way:
How can I replicate JavaScript's spread operator and how can I pass that to
IViewProperties
?Thanks
The text was updated successfully, but these errors were encountered: