So I\'m moving away from class based components to functional components but am stuck while writing test with jest/enzyme for the methods inside the functional components wh
Instead of isLoginDisabled state, try using the function directly for disabled. Eg.
const renderSigninForm = () => (
<>
>);
When I was trying similar thing and was trying to check state(enabled/disabled) of the button from the test case, I didn't get the expected value for the state. But I removed disabled={isLoginDisabled} and replaced it with (password.length < 8 || !validateEmail(email)), it worked like a charm. P.S: I am a beginner with react, so have very limited knowledge on react.