Jul 17, 2024
react-step-form
npx create-react-app .
npm install @material-ui/core
npm start
(use different port if needed, e.g., 3001
)components
folder with files:
UserForm.js
: Parent component, manages state and stepsFormUserDetails.js
: Component for user detailsFormPersonalDetails.js
: Component for personal detailsConfirm.js
: Component to confirm entered dataSuccess.js
: Success componentnextStep
: Increments the step in the stateprevStep
: Decrements the stephandleChange
: Updates state with input valuesnextStep
, prevStep
, handleChange
, and values
App.js
with UserForm
componentAppBar
for navigation barTextField
for input fieldsRaisedButton
for buttonshandleChange
, nextStep
, values
FormUserDetails
but for personal details (occupation, city, bio)UserForm
List
and ListItem
components for data presentationhandleChange
needed since no inputs in this stepAppBar
UserForm