Replies: 1 comment
-
flowchart LR
A[Update useForm] -->B{Template Form}
C[Create useForm] -->B
B-->D[Input]
B-->E[Input]
B-->F[Input]
B-->GD[Input]
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
So, how can I use a basic form for create and update, for example with just a switch in the props? currently I have a component in front of it that can call the template component with create or update. The thing is, the
useForm
is on the initiator while the template holds thecustomInput
so now the data is stretched over 3 components. And also changes are made in all three. so thecustomInput
all have auseField
for there field. The template component initializes some initial values depending on create or update. That seems to be the wrong place.I would like some input on how to manage/create reusable forms or how to organize them better in other ways?
Beta Was this translation helpful? Give feedback.
All reactions