You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rather than setup a component such that I need to find a creative way for my calls to be constantly updating in a useMemo or something like that.
Describe alternatives you've considered.
Instead of having my calls prop behave like a promise where I can fetch calls and then return the calls to the transaction button, I need to do extra work to ensure that my calls are memoized and stay updated based on user behavior.
Example: consider the situation where a user controls an input field and based on the amount that they enter, I need to fetch a quote and create calls based on the quote. In the current setup, I need to watch the input field and fire off a query to fetch a quote when the input changes.
If instead I could pass an async function to the transaction component, I could execute the fetch for the quote only once and then return the calls to the transaction component at the time of execution.
The text was updated successfully, but these errors were encountered:
Describe the solution you'd like
I would like the component to accept an async function in the calls prop that resolves to calls.
I would much rather have a component that looks like this:
Rather than setup a component such that I need to find a creative way for my calls to be constantly updating in a useMemo or something like that.
Describe alternatives you've considered.
Instead of having my calls prop behave like a promise where I can fetch calls and then return the calls to the transaction button, I need to do extra work to ensure that my calls are memoized and stay updated based on user behavior.
Example: consider the situation where a user controls an input field and based on the amount that they enter, I need to fetch a quote and create calls based on the quote. In the current setup, I need to watch the input field and fire off a query to fetch a quote when the input changes.
If instead I could pass an async function to the transaction component, I could execute the fetch for the quote only once and then return the calls to the transaction component at the time of execution.
The text was updated successfully, but these errors were encountered: