MCPcopy Create free account
hub / github.com/WebDevSimplified/react-multistep-form / updateFields

Function updateFields

src/App.tsx:33–37  ·  view source on GitHub ↗
(fields: Partial<FormData>)

Source from the content-addressed store, hash-verified

31function App() {
32 const [data, setData] = useState(INITIAL_DATA)
33 function updateFields(fields: Partial<FormData>) {
34 setData(prev => {
35 return { ...prev, ...fields }
36 })
37 }
38 const { steps, currentStepIndex, step, isFirstStep, isLastStep, back, next } =
39 useMultistepForm([
40 <UserForm {...data} updateFields={updateFields} />,

Callers 3

AccountFormFunction · 0.85
UserFormFunction · 0.85
AddressFormFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected