formsy-react getting Uncaught TypeError: _formsyReact2.default.addValidationRule is not a function

476 Views Asked by At

I have been trying to run react starter kit with formsy-react, I see babel converts it to formsyrect2.addvalidationRule to formsyrect2.default.addvalidationRule.

enter image description here

enter image description here

enter image description here

I see Formsy.addValidationRule is searching for _formsyReact2.default.addValidationRule

1

There are 1 best solutions below

0
felixmosh On

It converts it into default import cause you are used that syntax, it should be import * as Formsy from 'formsy-react';