-
you should make a folder for your components named
components
. -
you should
create a folder for each component
you create inside of the components folder. -
you should create 3 components
(InputField,TextAreaField,HW)
. -
you should render your
HW
component inside of the App component. -
you should render the
InputField
,TextAreaField
and a button of type submit inside a form element inside of theHW
component to resemble the structure of the homework(name,email,message)
. -
InputField
,TextAreaField
should have a label and a text input(input,textarea)
element. -
you should declare your states for your component inside of the HW component and then pass them to the related components ie
value={state}
setValue={setState}
. -
you should handle the displaying of your states and the state change inside of the component related to the state.
-
the props you should pass to your child components from the HW component are:
InputField({ label, type, value, onChange,required })
TextAreaField({ label, value, onChange,required })
-
your input fields should all be
required
. -
when you click the submit button it should submit the form.
-
Notifications
You must be signed in to change notification settings - Fork 24
shecodestooiq/simpleform
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published