-
you should make a folder for your components named
components. -
you should
create a folder for each componentyou create inside of the components folder. -
you should create 3 components
(InputField,TextAreaField,HW). -
you should render your
HWcomponent inside of the App component. -
you should render the
InputField,TextAreaFieldand a button of type submit inside a form element inside of theHWcomponent to resemble the structure of the homework(name,email,message). -
InputField,TextAreaFieldshould 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.
-
Couldn't load subscription status.
- 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