# Forms . 09 . Building the form Component

**URL:** https://forum.codewithmosh.com/t/forms-09-building-the-form-component/760
**Category:** React Native
**Created:** [November 19, 2020, 3:21am UTC](https://forum.codewithmosh.com/t/forms-09-building-the-form-component/760 "2020-11-19T03:21:57Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![fletech](https://avatars.discourse-cdn.com/v4/letter/f/85f322/32.png) [@fletech](https://forum.codewithmosh.com/u/fletech)
#### Post date: [November 19, 2020, 3:21am UTC](https://forum.codewithmosh.com/t/forms-09-building-the-form-component/760/1 "2020-11-19T03:21:57Z")

</div>

import React from ‘react’;  
import { Formik } from ‘formik’;

function AppForm({ initialValues, onSubmit, validationSchema, children }) {  
return (

```
      <Formik 
           initialValues={initialValues}
           onSubmit={onSubmit}
           validationSchema= {validationSchema}
      > 
           <>{children}</>
      </Formik>
 );

```

}

export default AppForm;

Inside the should pass only the children wrapped on a fragment as: \<\> {children} \</\>.

Otherwise has not been working and I’ve spent too much time trying to fix it as far that I think I got it.  
By the way, if someone of you knows if is not like this just let me know on the comments below.

Thanks!!!
