DEV Community

Discussion on: Build and validate forms in React Native using Formik and Yup

Collapse
 
kevinleung56 profile image
Kevin Leung

This helped a lot but I keep getting 'Uncaught Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined.' error. Any ideas on this?

Collapse
 
amanhimself profile image
Aman Mittal

The general occurrence of that error is when one of the component file is missing export default statement.

Collapse
 
kevinleung56 profile image
Kevin Leung • Edited

Got it fixed. Was somehow due to the use of Fragment in the formik. Changed it to View or SafeAreaView and it worked.

Thread Thread
 
amanhimself profile image
Aman Mittal

I am glad it worked for you :)