Z
Z
zlodiak2020-10-25 20:17:22
React
zlodiak, 2020-10-25 20:17:22

How to throw a callback into a form?

I created a submit validation form using redux-form . My form component consists of three files :

Form.js
Page4smart.jsx
Submit.js


I added a 'submitCallback' callback to the Submit.js file using import, which will work when the form is successfully submitted. The problem is that I incorrectly threw the callback. If my component consisted not of three files, but of two, then I would get a cyclic dependency.

Please tell me how can I pass the 'submitCallback' callback from Page4smart.jsxto Submit.jswithout using import.

LIVE DEMO

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question