DEV Community

Discussion on: React Hooks: (0 , _customhooks.default) is not a function

Collapse
 
hangindev profile image
Jason Leung 🧗‍♂️👨‍💻 • Edited

The customhooks.js file is empty?

Collapse
 
mohammedasker profile image
Mohammed Asker

Oh, I forgot to add it. I've updated it just now.

Collapse
 
hangindev profile image
Jason Leung 🧗‍♂️👨‍💻

Does the error still exist??

Thread Thread
 
mohammedasker profile image
Mohammed Asker

No, the error has disappeared and I can see the elements. Now the real problem I'm facing is I cannot render the submitted input values from NewList component into the MyJobList component.

Thread Thread
 
jakeerc profile image
Jakeer

Destructure the props in MyJobList component properly in ({ prop})

const MyJobList = ({inputs}) => (
  <div>
    <h3>{inputs.positionTitle}</h3>
    <p>{inputs.companyName}</p>
    <p>{inputs.jobLink}</p>
  </div>
);