-
Hello! How do you handle I've created this higher-order function to solve it: function withFormState<T, R>(
func: (inputs: T) => R,
): (arg0: unknown, inputs: T) => R {
return (_, inputs: T) => func(inputs);
}
const myAction = withFormState(action(schema, async (data) => {
...
})); Is this fine? Or is there another preferred way of solving this? |
Beta Was this translation helpful? Give feedback.
Answered by
TheEdoRan
Feb 17, 2024
Replies: 1 comment 1 reply
-
Hi, Form Actions support will land in v7, I'm still looking for a way to properly implement them, but your snippet will surely help development. Please track #29 for updates, you can contribute to the discussion there too. Thank you! |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
benjick
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, Form Actions support will land in v7, I'm still looking for a way to properly implement them, but your snippet will surely help development. Please track #29 for updates, you can contribute to the discussion there too. Thank you!