frames-react-native
frames-react-native copied to clipboard
Feature: Frames `ref` for `submitCard()`
Hey @ioan-ghisoi-cko, @dani-z!
Until now, there was no way to submit Frames form without using your SubmitButton
as Frames
's child. However, this creates an issue if we want to use our own custom button, or to control the form from up the component tree.
I added the ability to pass ref
to Frames
wrapper, which exposes submitCard()
method. This way you can trigger form submission whenever you want.
Please let me know if I can improve anything.
I think this would also solve another user's issue #29.
Hi, @ioan-ghisoi-cko, any chance this could be looked into soon?
This is useful for better consistency with frames-react
. Another nice addition on top of this would be if submitCard
returned response
like in frames-react
.