Passing Thoughts, e.preventDefault(); not working

I’m revisiting this project and have already completed it.

For some reason my e.preventDefault(); code is not working on the handleSubmit function.

code:

I’m getting a 403 error trying to edit this post with code or even trying to reply to it

hope this works, its in addthoughtform.js: Codecademy export · GitHub

Waiting for a fix: Error 403 when trying to post in forum

I think you are missing a comma in the import in AddThoughtForm.js,

// You wrote:
import React {useState} from 'react';

// It should be:
import React, {useState} from 'react';

1 Like

Thanks @mtrtmk, facepalm moment!

1 Like

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.